我对编程很新,我正在尝试通过示例来学习Brad Larson的 GPUImage 。
我正在使用 Xcode 7.2 ,很少有这些示例可以直接使用。
我发现如何通过更改部署目标来修复此错误"-fembed-bitcode is not supported on versions of iOS prior to 6.0"
。
但我无法想出这个:
'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
我已经在stackOverflow上尝试了几个答案,但没有一个有效。为了缩小范围,我真的想看看colorObjectTracking示例是如何工作的。
答案 0 :(得分:0)
问题是在方法rootViewController
完成之前,主窗口的application:didFinishLaunchingWithOptions:
属性未设置。
要解决此问题,您必须将此方法的主体(可在ColorTrackingAppDelegate.m
文件中找到)更改为以下内容:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ColorTrackingViewController alloc] initWithNibName:nil bundle:nil];
[self.window makeKeyAndVisible];
return YES;
}
<强>更新强>
我提交了Pull Request,修复了ColorObjectTracking
示例项目中导致问题的原因。你可以找到它here。