|
|
|
@ -24,15 +24,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
@implementation OWSNavigationController
|
|
|
|
|
|
|
|
|
|
- (instancetype)initWithRootViewController:(UIViewController *)rootViewController
|
|
|
|
|
- (instancetype)initWithOWSNavigationBar
|
|
|
|
|
{
|
|
|
|
|
self = [self initWithNavigationBarClass:[OWSNavigationBar class] toolbarClass:nil];
|
|
|
|
|
if (!self) {
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[self pushViewController:rootViewController animated:NO];
|
|
|
|
|
|
|
|
|
|
if (![self.navigationBar isKindOfClass:[OWSNavigationBar class]]) {
|
|
|
|
|
OWSFailDebug(@"navigationBar was unexpected class: %@", self.navigationBar);
|
|
|
|
|
return self;
|
|
|
|
@ -50,6 +48,17 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (instancetype)initWithRootViewController:(UIViewController *)rootViewController
|
|
|
|
|
{
|
|
|
|
|
self = [self initWithOWSNavigationBar];
|
|
|
|
|
if (!self) {
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
[self pushViewController:rootViewController animated:NO];
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)dealloc
|
|
|
|
|
{
|
|
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
|
|
|