How to add a TabBar to NavigationController based iPhone app

前端 未结 6 494
花落未央
花落未央 2020-12-24 03:51

I have a simple NavigationController based app. The main window shows a TableView and selecting an item loads a sub-view. I used Interface Builder for UI views.

Now

6条回答
  •  清酒与你
    2020-12-24 04:19

    Take a look at the UICatalog sample code. It has lots of great stuff in it, including the transition from one view to the next.

    In your case, you need to use the UITableView delegate method

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    

    In that method, you'll create and display your tab view controller. This could be a custom controller with an associated Nib, or you could create the whole thing in code depending on your circumstance.

提交回复
热议问题