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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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-20-2009, 07:21 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Location: Redwood City, CA
Posts: 31
Default tabBarController:shouldSelectViewController: not being invoked

Hi, all...

In my iPhone 3.0 app, tabBarController:shouldSelectViewController: is not being invoked when I switch tabs. I implemented it in my app delegate (which is where I think it's supposed to be). That is where I have an outlet to the tab bar controller that is in the main NIB for my app. My tab bar has all the expected icons and switches just fine.

What am I missing?

Thx

Steve
sfogel2 is offline   Reply With Quote
Old 02-01-2010, 07:11 PM   #2 (permalink)
Registered Member
 
Join Date: Feb 2010
Location: Lausanne, Switzerland
Posts: 2
Default

@Steve : Did you ever get the answer to this one? I'm running into the same issue. My applicationDidFinishLaunching is running (obviously), but shouldSelectViewController is not getting triggered at all. Thanks for any help/pointers.
koppenhoefer is offline   Reply With Quote
Old 02-01-2010, 07:41 PM   #3 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,129
Default

Probably need to specify the tab bar controller's delegate.
__________________
BriTer Ideas LLC - Code review, consulting, development. PM for pricing.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
BrianSlick is offline   Reply With Quote
Old 02-01-2010, 07:53 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2010
Location: Lausanne, Switzerland
Posts: 2
Default

Quote:
Originally Posted by BrianSlick View Post
Probably need to specify the tab bar controller's delegate.
Yup... My interface specified UIApplicationDelegate and not UITabBarControllerDelegate.

But I also needed to add the following to applicationDidFinishLaunching:

Code:
[rootController setDelegate:self];
Now I'm a happy camper.
Thanks for the help.
koppenhoefer is offline   Reply With Quote
Old 02-02-2010, 02:29 AM   #5 (permalink)
Registered Member
 
Join Date: Mar 2009
Location: Redwood City, CA
Posts: 31
Default tabBarController:shouldSelectViewController: not being invoked

Glad you got it working.

What was missing for me was also the specification for who was the delegate for the UITabBarController. I made the connection in Interface Builder. I had the TabBarController and my app delegate as items in the main window of IB, and the TabBarController had a delegate outlet which I connected to my app delegate.

Whatta relief.

Steve
sfogel2 is offline   Reply With Quote
Reply

Bookmarks

Tags
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: 272
25 members and 247 guests
ADY, Bertrand21, Dani77, Dattee, fkmtc, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, mer10, NSeven, prchn4christ, Rudy, sacha1996, silverwiz, sneaky, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

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