我在应用程序中遇到“wait_fences:无法收到回复:10004003”:didFinishLaunchingWithOptions:method。
我已经将UIWindow子类化,并覆盖了导致错误的drawRect方法。但是,我不知道错误试图告诉我什么,它为什么会发生以及如何解决它。
- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
window_ = [[OoviumWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[window_ makeKeyAndVisible];
controller_ = [[AetherController alloc] init];
[window_ setRootViewController:controller_];
return YES;
}
@implementation OoviumWindow
- (id) initWithFrame:(CGRect)rect {
if (self = [super initWithFrame:rect]) {
_image = [[UIImage imageNamed:@"Default-Portrait.png"] retain];
}
return self;
}
// UIWindow ======================================================================================
- (void) drawRect:(CGRect)rect {
[_image drawInRect:_rect blendMode:kCGBlendModeNormal alpha:.05];
}
@end
答案 0 :(得分:0)
这看起来实际上是"wait_fences: failed to receive reply: 10004003"?
的副本您使用application:didFinishLaunchingWithOptions:
时的症状略有不同,但最终结果是您在应用生命周期中过早地触发渲染操作。