2

I know that we can change the language in runtime by setting the value for "AppleLanguages" in user defaults. Can anyone suggest me how to achieve the following:

App is running->Press Home button -> Change Language in Settings -> Springboard will reload -> Double click the Home Button -> Take the App back to its original state with changed language, instead of restarting it. Is this possible ?

Kiran Kulkarni
  • 1,434
  • 2
  • 18
  • 40

1 Answers1

3

No you can't. Once Springboard is reloaded, all running apps are killed.

Though, as @Mike's comment pointed out, iOS 6 introduced a feature called State Preservation and Restoration. Read the links for more information. The App has to write handlers for preservation and restoration process in order to use this feature, and this feature is not guaranteed to have the app fully restored, as noted in the page (e.g. data model is not preserved).

HangarRash
  • 7,314
  • 5
  • 5
  • 32
Raptor
  • 53,206
  • 45
  • 230
  • 366
  • Thanks Shivan for replying, Is it possible to retain the current state (current navigation stack) while application is entering background and launch that particular state when it is launched ? Thanks in advance – Kiran Kulkarni May 14 '13 at 10:05
  • 1
    There is a new feature in iOS 6 called State Preservation and Restoration that you can use to maintain the state of your app after it has been quit - http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/StatePreservation/StatePreservation.html – Mike May 23 '13 at 21:14
  • 1
    updated link is https://developer.apple.com/documentation/uikit/view_controllers/preserving_your_app_s_ui_across_launches/ – yoAlex5 Aug 22 '23 at 15:11