0

プロジェクトで Apple マップの代わりに Google マップの使用を開始しましたが、問題なく動作します。ストリートビューを入れてみました(シングルビューでやりました)。画像は正常にロードされていますが、見回そうとすると「受信メモリ警告」が表示され、ストリートビューアプリケーションを使用して数秒でエラーなしで閉じられます。コードは現時点では非常に基本的です。

mapStreetView.h

#import <UIKit/UIKit.h>

@interface MapStreetView : UIViewController

@end

mapStreetView.m

#import "MapStreetView.h"
#import <GoogleMaps/GoogleMaps.h>

@interface MapStreetView ()

@end

@implementation MapStreetView
{
    GMSPanoramaView *panoView_;
}



- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];


}


- (void)loadView {
    panoView_ = [[GMSPanoramaView alloc] initWithFrame:CGRectZero];
    self.view = panoView_;

    [panoView_ moveNearCoordinate:CLLocationCoordinate2DMake(-33.732, 150.312)];

}



- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

Instruments では、アプリがますますメモリを消費し、約 70Mb の Dirty を取得するとクラッシュすることがわかりました。

また、シミュレーターではすべて正常に動作しています。私が使用しているデバイスは iPad 1 です。

誰でも私がそれを解決するのを助けることができますか? 私のプロジェクトでは非常に興味深いオプションです。

4

0 に答える 0