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-07-2011, 01:50 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 13
lll3mk4 is on a distinguished road
Default Call an action when switching views

Hello,

I would like to call a "save action" when I change views in a Navigation Based application. I have the save code but I need to know how to call that code when I go the the "Home" page of the app.


Thanks
lll3mk4 is offline   Reply With Quote
Old 04-07-2011, 02:12 PM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

viewWillAppear on your viewController?
__________________
dany_dev is offline   Reply With Quote
Old 04-07-2011, 02:51 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 13
lll3mk4 is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
viewWillAppear on your viewController?
I just tried that and still nothing.
lll3mk4 is offline   Reply With Quote
Old 04-07-2011, 06:25 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Default

If you're talking about the elusive "Back Button" on the navigation bar, try the UINavigationControllerDelegate method - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
architectpianist is offline   Reply With Quote
Old 04-07-2011, 10:12 PM   #5 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 13
lll3mk4 is on a distinguished road
Default

Quote:
Originally Posted by architectpianist View Post
If you're talking about the elusive "Back Button" on the navigation bar, try the UINavigationControllerDelegate method - (void)navigationControllerUINavigationController *)navigationController willShowViewControllerUIViewController *)viewController animatedBOOL)animated

Thank you! Would I put that in the AppDelegate.m or the ViewController.m
lll3mk4 is offline   Reply With Quote
Reply

Bookmarks

Tags
action, navigation, switch views

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: 365
13 members and 352 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:41 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0