I am getting the error "No visible interface for @LWWFirstController declares the selector initWithStyle". I have written similar code for setting up my Navigation Controller and it worked fine, but I can't seem to find what is causing this error. I have looked on StackOverFlow for similar issues but none fit, I'm using the correct method for it. Does anyone have in clue? Here is my code below.
#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;
}
It basically says you didn't implement initWithStyle
method in your LWWFirstLevelController
.
Are you sure it is a subclass of UITableViewController
?