mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-29 06:30:51 +00:00
fix update button state
if the user has UINavigationButton's text attributes customized iOS 6 beta 4 calls viewWillAppear if a navigationButton is set on the navigationItem in viewDidLoad (rdar://12214613) As BITUpdateViewController thinks the view was already loaded in viewWillAppear, the button state is not properly set. Setting the navigationButton in init fixes this.
This commit is contained in:
parent
994812ee43
commit
4285aa1eb8
@ -209,6 +209,14 @@
|
||||
|
||||
_cells = [[NSMutableArray alloc] initWithCapacity:5];
|
||||
_popOverController = nil;
|
||||
|
||||
//might be better in viewDidLoad, but to workaround rdar://12214613 and as it doesn't
|
||||
//hurt, we do it here
|
||||
if (self.modal) {
|
||||
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
||||
target:self
|
||||
action:@selector(onAction:)] autorelease];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -356,12 +364,6 @@
|
||||
|
||||
self.tableView.tableHeaderView = _appStoreHeader;
|
||||
|
||||
if (self.modal) {
|
||||
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
||||
target:self
|
||||
action:@selector(onAction:)] autorelease];
|
||||
}
|
||||
|
||||
PSStoreButton *storeButton = [[[PSStoreButton alloc] initWithPadding:CGPointMake(5, 40)] autorelease];
|
||||
storeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
|
||||
storeButton.buttonDelegate = self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user