[iPhone 4] Fixed viewport saving when app goes to background

This commit is contained in:
Alex Zolotarev 2011-03-07 22:19:13 +00:00 committed by Alex Zolotarev
parent c6f83b6bd2
commit b4584b1b31
3 changed files with 12 additions and 0 deletions

View file

@ -42,5 +42,6 @@ withConfidenceRadius: (double) confidenceRadius
// called when app is terminated by system
- (void) OnTerminate;
- (void) OnEnterBackground;
@end

View file

@ -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

View file

@ -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