Hi all.
I'm newbie in iPhone development and then sorry for my problem so simple.
I've a project 'window-based application' and I've added an UITabBarController into my application delegate and all done.
One of my tab is an UITableViewController that must contain one NavigationBar.
I've added in 'viewDidLoad' method but there are some problems.
You can see in png attached.
This are the code of UITableViewController.
LibraryTableviewController.h
Code:
#import <UIKit/UIKit.h>
@interface LibraryTableViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
NSDictionary *books;
NSArray *keys;
}
@property (nonatomic, retain) NSDictionary *books;
@property (nonatomic, retain) NSArray *keys;
@end
LibraryTableViewController.m
Code:
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
self.navigationItem.rightBarButtonItem = self.editButtonItem;
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:self] autorelease];
navController.navigationBar.barStyle = UIBarStyleBlackOpaque;
[self.view addSubview:navController.view];
NSString *path = [[NSBundle mainBundle] pathForResource:@"bookslistsorted" ofType:@"plist"];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
self.books = dict;
[dict release];
NSArray *array = [[books allKeys] sortedArrayUsingSelector:@selector(compare:)];
self.keys = array;
}
Can anyone help me?
Thank's,
Alex.