forked from organicmaps/organicmaps
[iPhone 4] Fixed viewport saving when app goes to background
This commit is contained in:
parent
c6f83b6bd2
commit
b4584b1b31
3 changed files with 12 additions and 0 deletions
|
@ -42,5 +42,6 @@ withConfidenceRadius: (double) confidenceRadius
|
|||
|
||||
// called when app is terminated by system
|
||||
- (void) OnTerminate;
|
||||
- (void) OnEnterBackground;
|
||||
|
||||
@end
|
||||
|
|
|
@ -299,6 +299,11 @@ NSInteger compareAddress(UITouch * l, UITouch * r, void * context)
|
|||
}
|
||||
|
||||
- (void) OnTerminate
|
||||
{
|
||||
[self OnEnterBackground];
|
||||
}
|
||||
|
||||
- (void) OnEnterBackground
|
||||
{
|
||||
if (m_framework)
|
||||
{ // save world rect for next launch
|
||||
|
@ -306,4 +311,5 @@ NSInteger compareAddress(UITouch * l, UITouch * r, void * context)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
[mapViewController OnTerminate];
|
||||
}
|
||||
|
||||
- (void) applicationDidEnterBackground: (UIApplication *) application
|
||||
{
|
||||
[mapViewController OnEnterBackground];
|
||||
}
|
||||
|
||||
- (void) applicationDidFinishLaunching: (UIApplication *) application
|
||||
{
|
||||
// Add the tab bar controller's current view as a subview of the window
|
||||
|
|
Loading…
Add table
Reference in a new issue