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 > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 03-26-2011, 06:39 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 4
Jack Fair_Weather is on a distinguished road
Default Catch events raised by NavigationBarButton

Anyone know how to catch events (eg. touchupinside) raised when the user taps the "back button" that is automatically placed on the left side of a navigation bar when a NavigationViewController is used?
Jack Fair_Weather is offline   Reply With Quote
Old 03-26-2011, 09:02 PM   #2 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

I never found a way to catch events on the built in back button, but you can replace the back button with your own button. Then you can do whatever you want, and pop the view controller to go back when you are ready.
__________________
My development blog: http://jrinn.com
JasonR is offline   Reply With Quote
Old 03-29-2011, 10:34 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 4
Jack Fair_Weather is on a distinguished road
Default

Quote:
Originally Posted by JasonR View Post
I never found a way to catch events on the built in back button, but you can replace the back button with your own button. Then you can do whatever you want, and pop the view controller to go back when you are ready.
Thanks, I've done just that. I like the arrow shape of the automatically installed back button, so I didn't want to give it up.
Jack Fair_Weather is offline   Reply With Quote
Old 03-30-2011, 07:22 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

I have done that by subclassing UINavigationController and overriding navigationBar:shouldPopItem , I then ask a custom delegate if it should allow going back or not.
nobre84 is offline   Reply With Quote
Reply

Bookmarks

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: 382
14 members and 368 guests
baja_yu, checkright, Duncan C, epaga, fvisticot, Meoz, mer10, Newbie123, Objective Zero, Punkjumper, reficul, rraagg, sacha1996, skrew88
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,642
Threads: 94,110
Posts: 402,857
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pinacate
Powered by vBadvanced CMPS v3.1.0

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