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 02-07-2011, 06:05 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 19
blackknight467 is on a distinguished road
Default Knowing when the back button is pressed in a navigation item

I have a tableview that takes a user to a UIWebview when a cell is selected. I want to execute some code when the user navigates away from that view by pressing the back button on the navigationbar. How do i do this?

I know one method is to just put the code in the VeiwWillDissapear method but i have a tab bar at the bottom and the method will get called if the user selects another tab, and i don't want the code i have to be run if that happens. Any suggestions?
blackknight467 is offline   Reply With Quote
Old 02-07-2011, 10:19 AM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Instead of using the built-in "Back" button, you can always add your own left bar button item with its own custom selector attached to it.
smithdale87 is offline   Reply With Quote
Old 02-07-2011, 05:41 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 19
blackknight467 is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
Instead of using the built-in "Back" button, you can always add your own left bar button item with its own custom selector attached to it.
oh, that works perfectly. thanks.
blackknight467 is offline   Reply With Quote
Reply

Bookmarks

Tags
uinavgationitem, uinavigationbarcontroller, uinavigationcontroller, viewwilldisappear

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: 366
14 members and 352 guests
7twenty7, blasterbr, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, Mah6447, Morrisone, n00b, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

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