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 04-08-2011, 06:53 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 13
lll3mk4 is on a distinguished road
Default NavBar Add command to the "back" button

Hello, I would like to know how to add an Action to the "back" button in a navigation based application. Thanks for any help!

lll3mk4 is offline   Reply With Quote
Old 04-08-2011, 07:47 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Code:
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithTitle:@"Button Title" style:UIBarButtonItemStyleBordered target:self action:@selector(buttonActionToCall)];
	self.navigationItem.leftBarButtonItem = buttonItem;
	[buttonItem release];
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 04-08-2011, 09:13 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2009
Location: Bristol, UK
Posts: 41
jimbo is on a distinguished road
Default

would that retain the back button though, or replace it with a square bar button? Not quite the same user experience.
jimbo is offline   Reply With Quote
Old 04-08-2011, 09:56 PM   #4 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

To give the same user experience, you have to draw your own button graphic to imitate the existing back button.
__________________
My development blog: http://jrinn.com
JasonR is offline   Reply With Quote
Reply

Bookmarks

Tags
add action, based, navigation

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: 357
13 members and 344 guests
dansparrow, dre, ilmman, LezB44, michelle, Nobbsy, Objective Zero, samdanielblr, Sami Gh, shagor012, sledzeppelin, thephotographer, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
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 01:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0