У меня проблемы с созданием таблицы с навигационной панелью или контроллером сверху.
У меня есть этот кусок кода,
- (void)viewDidLoad {
[super viewDidLoad];
UINavigationController *addNavCon = [[UINavigationController alloc]initWithNibName:@"Welcome" bundle:nil];
self.navigationItem.rightBarButtonItem = self.addButtonItem;
self.navigationItem.leftBarButtonItem = self.editButtonItem;
[self createEditableCopyOfDatabaseIfNeeded];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];
NSString *documentDirectory = [self applicationDocumentsDirectory];
NSString *path = [documentDirectory stringByAppendingPathComponent:@"notebook.plist"];
NSMutableArray *tmpArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
self.Notes = tmpArray;
[tmpArray release];
}
Тем не менее, панель навигации никогда не отображается, в то время как таблица в порядке. Могу ли я знать, в чем проблема с кодом?
Большое спасибо