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-02-2011, 10:01 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 7
CKallemeres is on a distinguished road
Default UISegmentedcontrol to switch views in UITabbarcontroller

I am trying to switch between multiple different views using a UISegmentedControl. I found a really good example to do this in: Red Artisan - Ruby on Rails Specialists - Melbourne, Australia - Switching Views with a UISegmentedControl - Revisited

However, I need to use a UITabbarController in my app. So the navigation controller is not available for me in the app delegate. Is there any other way to switch views in a UITabbarController using UISegmentedControl?

This is the structure of my application as I need it to be:

Media (Tab Bar Item)
- Lessons (Table view)
- Detail view
- Videos (Table view)
- Detail view

I wanted to make the segmented control switch between lessons and videos.
Thank you in advance for all your help!
CKallemeres is offline   Reply With Quote
Old 06-02-2011, 11:09 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Location: Atlanta, GA
Posts: 148
tripp13 is on a distinguished road
Default

Quote:
Originally Posted by CKallemeres View Post
I am trying to switch between multiple different views using a UISegmentedControl. I found a really good example to do this in: Red Artisan - Ruby on Rails Specialists - Melbourne, Australia - Switching Views with a UISegmentedControl - Revisited

However, I need to use a UITabbarController in my app. So the navigation controller is not available for me in the app delegate. Is there any other way to switch views in a UITabbarController using UISegmentedControl?

This is the structure of my application as I need it to be:

Media (Tab Bar Item)
- Lessons (Table view)
- Detail view
- Videos (Table view)
- Detail view

I wanted to make the segmented control switch between lessons and videos.
Thank you in advance for all your help!
why don't you add the navigation controller to the app delegate? you can do that despite what type of base template you are using.
tripp13 is offline   Reply With Quote
Old 06-02-2011, 03:06 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 7
CKallemeres is on a distinguished road
Default

Quote:
Originally Posted by tripp13 View Post
why don't you add the navigation controller to the app delegate? you can do that despite what type of base template you are using.
How would I do that?
CKallemeres is offline   Reply With Quote
Old 06-02-2011, 03:20 PM   #4 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

Your Media tab accepts as its contents a UIViewController. Once you are inside it, you want to switch to either of your Views, right ?
UINavigationController IS a UIViewController.
So when you first load your Media tab, you would not use as its contents the Lessons view controller, but instead a UINavigationController that has Lessons as its RootViewController, then you switch them using the method you mentioned
nobre84 is offline   Reply With Quote
Reply

Bookmarks

Tags
uisegmentedcontrol, uitabbarcontoller

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: 332
5 members and 327 guests
Dnnake, iOS.Lover, jenniead38, pbart, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

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