【发布时间】:2012-10-09 12:56:45
【问题描述】:
如果我在splitViewController 上加载带有UIPickerViewController 的窗口并且仅适用于新iPad 模拟器(不适用于旧iPad 模拟器或iPhone),我在通用项目中收到此错误("CGImageCreate: invalid image size: 0 x 0")纵向(不是横向)。
当我旋转 iPad 时出现错误。
我认为没有可能产生错误的图像...为什么?
我用来加载选择器的代码:
- (void) pickerViewControllerDidFinish:(PickerViewController *)controller {
if (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) {
self.path = controller.path;
[self dismissViewControllerAnimated:YES completion:nil];
FeedRootViewController *controllerF = [[FeedRootViewController alloc] initWithNibName:@"FeedRootViewController" bundle:nil];
controllerF.path = self.path;
controllerF.detailViewController = self.detailViewController;
[self.navigationController pushViewController: controllerF animated:YES];
[controllerF release];
NSString *urlAddress = [[NSBundle mainBundle] pathForResource:@"feeds" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[detailViewController.webView loadRequest:requestObj];
[detailViewController.webView setScalesPageToFit:YES];
[path release];
}
}
但是我不知道问题是不是来自这段代码......
【问题讨论】:
-
我也看到了这一点,我的应用程序仅适用于 iPhone,使用 iOS 6。我似乎在 Game Center 身份验证期间看到它,或者当我导航到/从我的 Game Center 视图时看到它。它偶尔看到它,不知道为什么。
-
你实现了iOS 6中引入的新的定位方法吗?即supportedInterfaceOrientations和shouldAutorotate?
-
你在设备上试过了吗?切勿将模拟器用于严肃的开发,因为它不可信。
标签: iphone ios objective-c xcode ipad