应用自动调整大小时,iOS8 MKMapView Framebuffer在旋转期间出错 [英] iOS8 MKMapView Framebuffer error during rotation when autoresize is applied

查看:211
本文介绍了应用自动调整大小时,iOS8 MKMapView Framebuffer在旋转期间出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#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

要查看问题,请运行上面的代码,只需旋转设备。
您将体验旋转动画的显着延迟。

To see the problem, run the above code and just rotate the device. You will experience a significant delay for the rotation animation to take place.

如果你连接iOS8 iPad并运行模拟器,你需要
收到这些警告:

If you connect an iOS8 iPad and run the simulator, you will receive these warnings:


崩溃! 0x15dd7980

ERROR /SourceCache/VectorKit/VectorKit-992.16/GeoGL/GeoGL/GLCoreContext.cpp 1237:Framebuffer不完整,附件不完整

Crash! 0x15dd7980
ERROR /SourceCache/VectorKit/VectorKit-992.16/GeoGL/GeoGL/GLCoreContext.cpp 1237: Framebuffer incomplete, incomplete attachment

任何人都知道如何解决这个问题吗?

Anyone know how to fix this problem?

推荐答案

我也遇到了这个问题,并且发现它只是似乎与选择的调整大小选项一起出现(即调整视图大小时调整高度和宽度)。我没有使用自动布局。

I am also experiencing this, and have found that it only seems to occur with the resizing options selected (i.e. resize height and width with as view resizes). I'm not using Auto Layout.

如果我只是将一个MKMapView添加到视图中,这没问题,但是如果我选择调整大小,它会生成相同的消息如上所示。

If I just add a MKMapView to a view, it's no problem, but if I select the resizing, it generates the same messages as shown above.

(很抱歉,这是评论而非答案,但我不能在1票上添加评论,我认为这可能有助于诊断问题)

(Sorry that this is a comment not an answer, but I can't add comments on 1 vote, and I thought this may help diagnose the issue)

更新 - 我在其中一个测试设备上安装了8.1 Beta,我没有遇到此问题。很有可能这是一个被8.1地毯扫过的问题:)

UPDATE - I have installed 8.1 Beta on one of my test devices, and I am NOT experiencing this issue. There is a good chance this is an issue that's being swept under the 8.1 carpet :)

这篇关于应用自动调整大小时,iOS8 MKMapView Framebuffer在旋转期间出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆