Hello,
I have a view. I want to put one UINavigationController and one UITableView in this view and display data from database into my TableView.
I put a UINavigationController in my instance window.
In the View part of this NavigationController I drag and drop a UITableView.
I map the File Owner->Identity Inspector->Class with the ViewController (.h and .m) class file created which is inherited with UIViewController and supports delegates. In this .m file I am writing my code for UITableView like numberOfRowsInSection and cellForRowAtIndexPath.
I am having two Outlets in this file: mainNavController which I connect with the UINavigationController of step 1 and tableView Outlet which I connect with the UITableView in the step 2. I connect the dataSource and the delegate of the tableView with the File Owner.
In my AppDelegate class I display this view as:
TournamentListController *tempViewController = [TournamentListController alloc]; tempViewController = [tempViewController initWithNibName:@"TournamentList" bundle:[NSBundle mainBundle]]; self.cntrlTournamentListController = tempViewController; [tempViewController release];
[window addSubview:[self.cntrlTournamentListController view]];
In the viewDidLoad method I write following code:
[self.view.window addSubview:mainNavController.view];
Still I am not able to achieve what I want