我的下面的代碼一切都在我的Xcode項目的AppDelegate.m
文件中。'NavigationViewController'沒有可見的@interface聲明選擇器'initWithRootViewController:'
#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。 (自動引用計數問題)。有沒有解決這個問題的方法?
感謝您的回覆! –