New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
iOS and Apps All your questions and discussion of iOS or iOS Apps.

Remove button from navigation bar of all screens and show it to only one screen.


Post Reply New Thread Subscribe

 
Thread Tools
prateek.chaubey

 
Member Since: Feb 21, 2011
Posts: 22
prateek.chaubey is on a distinguished road
Mac Specs: Macbook Air 11", 64 GB, Intel core i5, 1.6 GHz, OSX Lion 10.7

prateek.chaubey is offline
In my app for iPad, I have first a welcome screen then home screen and then home screen navigates to rest of the screens. I have made a button on navigation bar of the home screen which takes the user back to the welcome screen. But that button is shown on all other screens as well. I want to remove that button from all the screens and show it only in the home screen. How can I hide that button from all other screens and make it visible only on the home screen?

Here is the code which I wrote for that button in viewDidLoad of Home:

PHP Code:
CGRect frame4 CGRectMake(10.00.040.040.0);
UIImage *buttonImage4 = [UIImage imageNamed:@"InfoIcon.png"];
UIButton *InfoButton = [UIButton buttonWithType:UIButtonTypeCustom];
InfoButton.frame frame4;
[
InfoButton setBackgroundImage:buttonImage4 forState:UIControlStateNormal];
InfoButton.contentVerticalAlignment UIControlContentVerticalAlignmentCenter;
InfoButton.contentHorizontalAlignment UIControlContentHorizontalAlignmentCenter;
[
InfoButton addTarget:self action:@selector(infoforControlEvents:UIControlEventTouchUpInside];
[
InfoButton setBackgroundColor:[UIColor clearColor]];
[
self.navigationController.navigationBar addSubview:InfoButton]; 
Thanks
PC
QUOTE Thanks

Post Reply New Thread Subscribe


« Playlist sort problem with iOS 5 Music app | An error occurred while backing up this iPhone (-50). »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Do you have any ideas for future Apple products? the8thark Schweb's Lounge 28 10-07-2010 10:48 PM

All times are GMT -4. The time now is 10:37 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?