forked from organicmaps/organicmaps
[ios] Removed obsolete viewDidUnload as it's not called on iOS 6+
This commit is contained in:
parent
09ab6bbd74
commit
a78f2e3c89
4 changed files with 14 additions and 40 deletions
|
@ -120,12 +120,14 @@ typedef enum {Editing, Saved} Mode;
|
|||
color:@""
|
||||
category:MakeEmptyBookmarkAndCategory()
|
||||
point:point];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
self.pickerView = nil;
|
||||
self.pinTitle = nil;
|
||||
self.pinNotes = nil;
|
||||
|
@ -156,18 +158,12 @@ typedef enum {Editing, Saved} Mode;
|
|||
{
|
||||
[super viewDidLoad];
|
||||
self.title = self.pinTitle;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
if (m_mode == Editing)
|
||||
[self addRightNavigationItemWithAction:@selector(save)];
|
||||
else
|
||||
[self addRightNavigationItemWithAction:@selector(edit)];
|
||||
}
|
||||
|
||||
-(void)viewDidUnload
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return YES;
|
||||
|
|
|
@ -516,13 +516,6 @@ NSInteger compareAddress(id l, id r, void * context)
|
|||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
- (void) viewDidUnload
|
||||
{
|
||||
// to correctly release view on memory warnings
|
||||
self.m_myPositionButton = nil;
|
||||
[super viewDidUnload];
|
||||
}
|
||||
|
||||
- (void) OnTerminate
|
||||
{
|
||||
GetFramework().SaveState();
|
||||
|
@ -779,4 +772,12 @@ NSInteger compareAddress(id l, id r, void * context)
|
|||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[self destroyPopover];
|
||||
self.m_myPositionButton = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -75,12 +75,6 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type;
|
|||
self.contentSizeForViewInPopover = CGSizeMake(320, 480);;
|
||||
}
|
||||
|
||||
-(void)viewDidUnload
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super viewDidUnload];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
-(void)viewDidLoad
|
||||
|
@ -88,7 +82,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type;
|
|||
[super viewDidLoad];
|
||||
self.navigationController.navigationBarHidden = NO;
|
||||
[self setTitle:NSLocalizedString(@"info", nil)];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
|
@ -315,6 +309,7 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type;
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
self.placeAndCompass = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
|
|
@ -228,6 +228,8 @@ static void OnSearchResultCallback(search::Results const & res)
|
|||
- (void)dealloc
|
||||
{
|
||||
g_searchVC = nil;
|
||||
[m_indicator release];
|
||||
[m_originalIndicatorView release];
|
||||
[m_searchBar release];
|
||||
[m_table release];
|
||||
[categoriesNames release];
|
||||
|
@ -240,26 +242,6 @@ static void OnSearchResultCallback(search::Results const & res)
|
|||
g_searchVC = self;
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
{
|
||||
g_searchVC = nil;
|
||||
// to correctly free memory
|
||||
[m_indicator release];
|
||||
m_indicator = nil;
|
||||
[m_originalIndicatorView release];
|
||||
m_originalIndicatorView = nil;
|
||||
[m_searchBar release];
|
||||
m_searchBar = nil;
|
||||
[m_table release];
|
||||
m_table = nil;
|
||||
[categoriesNames release];
|
||||
categoriesNames = nil;
|
||||
[_searchResults release];
|
||||
_searchResults = nil;
|
||||
|
||||
[super viewDidUnload];
|
||||
}
|
||||
|
||||
// Banner dialog handler
|
||||
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue