Remember Apps last screen in iPhone app -
I have to remember the last screen of my app, that means if I open my app,
P>
Take a look at NSUserDefaults
API. You can save the object to NSUserDefaults
for the current code and then check that object at the launch.
A NSMutableDictionary
object when a view is loaded, and it changes the value every time, and stores it in user default.
NSMutableDictionary * currentScreen = [[NSMutableDictionary alloc] init]; [Current screen set object: @ "about page" for: @ "screen"]; NSUserDefaults * Standard User Defaults = [NSUserDefaults Standard User Defaults]; [StandardUserDefaults Set Object: Currentscreen Farke: @ "Last Screen"];
Then when the app loads, then the user checks the default "Last Screen" key and loads the appropriate view.
Hope it helps.
Comments
Post a Comment