我的以下代码所有内容都在AppDelegate.m
我的 Xcode 项目文件中。
#import "AppDelegate.h"
#import "NavigationViewController.h"
#import "HubViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [[NavigationViewController alloc] initWithRootViewController:[[HubViewController alloc] init]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
@end
我不断收到错误'self.window.rootViewController' line stating 'No visible @interface for NavigationViewController' declares the selector 'initWithRootViewController:'
。它还在错误日志中将其声明为 1ARC Issue1。(自动引用计数问题)。这个问题是否有任何已知的解决方案?