mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-25 12:40:36 +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) {
|
if (self) {
|
||||||
_modalAnimated = YES;
|
_modalAnimated = YES;
|
||||||
_modal = NO;
|
_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;
|
return self;
|
||||||
}
|
}
|
||||||
@ -42,6 +33,14 @@
|
|||||||
self = [self init];
|
self = [self init];
|
||||||
if (self) {
|
if (self) {
|
||||||
_modal = modal;
|
_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;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user