#import "AppDelegate.h" #import <MapKit/MapKit.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { [self setWindow:[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]]; [self.window makeKeyAndVisible]; UIViewController *vc = [[UIViewController alloc] init]; self.window.rootViewController = vc; vc.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; MKMapView *map = [[MKMapView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; map.autoresizingMask = UIViewAutoresizingFlexibleHeight; [vc.view addSubview:map]; return YES; } @end
要查看问题,请运行上面的代码并旋转设备.
您将体验到旋转动画发生的显着延迟.
如果您连接iOS8 iPad并运行模拟器,
你会收到这些警告:
Crash! 0x15dd7980
ERROR /SourceCache/VectorKit/VectorKit-992.16/GeoGL/GeoGL/GLCoreContext.cpp 1237: Framebuffer incomplete,incomplete attachment
有谁知道如何解决这个问题?
解决方法
我也遇到了这种情况,并且发现只有在选择了调整大小选项时才会出现这种情况(即调整视图大小时调整高度和宽度).我没有使用自动布局.
如果我只是将一个MKMapView添加到视图中,这没有问题,但是如果我选择调整大小,它会生成如上所示的相同消息.
(对不起,这是评论而非答案,但我无法在1票上添加评论,我认为这可能有助于诊断问题)
更新 – 我在我的一个测试设备上安装了8.1 Beta,我没有遇到这个问题.很有可能这是一个被8.1地毯扫过的问题:)