Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone - tabbar + view issue
    primarykey
    data
    text
    <p>I am using a UITabBar control from library in one of my view (note that I am not using UITabBarController but the UITabBar control).</p> <p>Now, I am adding two tabBar items to this tabBar.</p> <p>I have created controller class for this view (.m and .h) files and used delegates in the .h file.</p> <p>In the .m file I have used the following function:</p> <ul> <li>(void)tabBar:(UITabBar *)TabBarControl didSelectItem:(UITabBarItem *)FirstView</li> </ul> <p>I have assigned tag = 0 and tag = 1 to respective tabBar items. </p> <p>What I want to do is that, on click of first tabBar item I want to show a view and click of another tabBar item, I want to show another view.</p> <p>So, in the above function I am checking that if the tag of clicked tabBar item is 0 than I will show one view else I will show another view.</p> <p>I am showing the view as following:</p> <p>Team1Scoreboard *tempTeam1Scoreboard = [Team1Scoreboard alloc]; tempTeam1Scoreboard = [tempTeam1Scoreboard initWithNibName:@"UserTeamScoreboard" bundle:[NSBundle mainBundle]];</p> <pre><code> self.cntrlTeam1Scoreboard = tempTeam1Scoreboard; [tempTeam1Scoreboard release]; UIView *theWindow = [self.view superview]; [self.view removeFromSuperview]; [theWindow addSubview:self.cntrlTeam1Scoreboard.view]; </code></pre> <p>Now the problem is that, when I click on any of the tabBar item, it will load the correct view but the tabBar itself will be disappeared as I am adding the view to window itself. </p> <p>Please help me so that I can load correct view and also my tabBar itself is visible.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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