我收到错误“@LWWFirstController 没有可见界面声明选择器 initWithStyle”。我已经编写了类似的代码来设置我的导航控制器并且工作正常,但我似乎找不到导致此错误的原因。我在 StackOverFlow 上查看过类似的问题,但都不合适,我正在使用正确的方法。有没有人有线索?下面是我的代码。
#import "LWWAppDelegate.h"
#import "LWWFirstLevelController.h"
@implementation LWWAppDelegate
@synthesize window = _window;
@synthesize navController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
LWWFirstLevelController *first = [[LWWFirstLevelController alloc] initWithStyle:UITableViewStylePlain];
self.navController = [[UINavigationController alloc]
initWithRootViewController:first];
[self.window addSubview:navController.view];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}