Note that there are some explanatory texts on larger screens.

plurals
  1. POData is not displaying on tableview when i use UITabBar
    text
    copied!<p>i am doing application where there is a situation i have to use Tab Bar with 3 to 4 Tab Items to move between the Views.</p> <p>It is a View Based applcation so i am using Tab Bar using code.I have a login page once i enter login details and when it get success it moves to next screen called Myservices which contains UITableView in the view.This is the code below which i am using for bring TabBar on the screen. i have wriiten this code in AppDelegate.m</p> <p>//Appdelegate.m</p> <pre><code>- (void) initializeTabBar{ tabBarController = [[UITabBarController alloc] init]; NSMutableArray *localViewControllersArray = [[NSMutableArray alloc] initWithCapacity:8]; MyServices* ser = [[MyServices alloc] init]; UINavigationController* serNav = [[UINavigationController alloc] initWithRootViewController:ser]; serNav.tabBarItem.title = @"My Services"; [ser release]; [localViewControllersArray addObject:serNav]; [serNav release]; History* his = [[History alloc] init]; UINavigationController* hisNav = [[UINavigationController alloc] initWithRootViewController:his]; hisNav.tabBarItem.title = @"History"; [his release]; [localViewControllersArray addObject:hisNav]; [hisNav release]; </code></pre> <p>}</p> <pre><code>-(void)showTabBar </code></pre> <p>{</p> <pre><code>[self initializeTabBar]; self.window.rootViewController = nil; self.window.rootViewController = tabBarController; tabBarController.selectedIndex = 0; </code></pre> <p>}</p> <p>And after login success i am placing this code in loginPage.m to get TabBar on next screen.</p> <pre><code>Intelligent_ConciergeAppDelegate *appDelegate = (Intelligent_ConciergeAppDelegate*)[[UIApplication sharedApplication] delegate]; [appDelegate showTabBar]; </code></pre> <p>Problem is when i click on login it moves to next screen it shows TabBar but the data is not displaying in the tableView.</p> <p>When i dont use the above two lines of code to call TabBar the data Displays on TableView.But when i call the above function It shows screen with TabBar but data is not displaying on the tableView.TableView is showing empty cells.It works fine when i dont use TabBAr. What is the problem can anyone tel me where i am going wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload