The navbar buttons were not properly displayed.

This commit is contained in:
yannick
2015-11-27 09:59:51 +01:00
parent 596b781357
commit 14317412ab
3 changed files with 30 additions and 2 deletions
@@ -81,8 +81,6 @@
{
[super viewWillAppear:animated];
[self addDoneButton];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didMXSessionStateChange:) name:kMXSessionStateDidChangeNotification object:nil];
}
@@ -94,6 +92,13 @@
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXSessionStateDidChangeNotification object:nil];
}
// this method is called when the viewcontroller is displayed inside another one.
- (void)didMoveToParentViewController:(nullable UIViewController *)parent
{
[super didMoveToParentViewController:parent];
[self addDoneButton];
}
- (void)destroy
{
self.navigationItem.rightBarButtonItem.enabled = NO;