Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-25-2011, 11:46 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
AlexK is on a distinguished road
Default Tab Bar with Navigation view

Are there any tutorials out there for how to nest a Navigation view inside a Tab Bar in xcode 4? I found a tutorial that looked promising but it was for xcode 3 and i got lost.

Thanks in advance for anyone willing to help.
AlexK is offline   Reply With Quote
Old 06-25-2011, 12:54 PM   #2 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

There actually are no good tutorials that explain this relatively simple thing in simple enough terms. One seemingly popular tutorial include an insane amount of work and suggest subclassing almost everything. I figured I'd just write down the required steps here. Let me know if this isn't clear enough.

1) Create a new Tab bar based project.

2) For this exercise we will replace the second tab with a navigation controller. So delete:
SecondViewController.h
SecondViewController.m
SecondView.xib

3) Right click your project > New File. Select UIViewController Subclass > Subclass of UITableViewController. (Select to include XIB for interface).
* I'm not a fan of UITableViewController, in most cases you're better off using a UIViewController with a UITableView but that's a different discussion.

4) Select MainWindow.xib so that IB opens. Make sure to show the Utilities View (on the right hand side).

5) Expand the Tab Bar Controller object under Objects. Delete the 'Second View Controller'.

6) Drag a Navigation Controller from the Objects on the Utility View and drop it onto the Tab Bar Controller on the same level as the 'First View Controller'.

7) Expand your new Navigation Controller and select 'View Controller'

8) Go to the Identity inspector and under Custom Class change the Class to the name of the class you created in step 3.

9) Show the attributes inspector and set the NIB Name to the same name.

10) Enjoy the fruits of your labour.
sneaky is offline   Reply With Quote
Reply

Bookmarks

Tags
navigation view, tab bar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
8 members and 322 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:28 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0