mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-24 04:00:45 +00:00
Fix modal views not having a done button
This commit is contained in:
parent
f8cb400a92
commit
b47cbf78c8
@ -25,15 +25,6 @@
|
||||
if (self) {
|
||||
_modalAnimated = YES;
|
||||
_modal = NO;
|
||||
|
||||
//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(onDismissModal:)] autorelease];
|
||||
}
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -42,6 +33,14 @@
|
||||
self = [self init];
|
||||
if (self) {
|
||||
_modal = modal;
|
||||
|
||||
//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(onDismissModal:)] autorelease];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user