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 11-26-2010, 08:46 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 213
sle39lvr is on a distinguished road
Smile UITabBarDelegate Question

Dear SDK Guru's,

Picture the default start-up project in Xcode with the UITabBar.

For several reasons, I have to run the 'Tab Bar' with one ViewController. This could or could not be the reason.

I want to use:
Code:
- (void) tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
method to do things when clicked on a different tab.

However it crashes when I put this line in "viewDidLoad" method:

Code:
- (void)viewDidLoad 
{
   [[self tabBarController] tabBar].delegate = self;
}
sle39lvr is offline   Reply With Quote
Old 11-26-2010, 11:47 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 108
iphone_bharat is on a distinguished road
Default

Quote:
'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'
However if that is ur requirement why dont u take a "View Based Application" and add a TabBar to it ..
iphone_bharat is offline   Reply With Quote
Old 11-26-2010, 11:58 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 213
sle39lvr is on a distinguished road
Default

Quote:
Originally Posted by iphone_bharat View Post
However if that is ur requirement why dont u take a "View Based Application" and add a TabBar to it ..
Thanks, I will try that.
sle39lvr is offline   Reply With Quote
Reply

Bookmarks

Tags
change tabs, uitabbar, uitabbardelegate

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: 379
7 members and 372 guests
daudrizek, HemiMG, Kirkout, MarkC, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,665
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, daudrizek
Powered by vBadvanced CMPS v3.1.0

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