mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Done button refresh update
This commit is contained in:
@@ -48,6 +48,18 @@
|
||||
|
||||
@implementation RoomSettingsViewController
|
||||
|
||||
- (void)addDoneButton
|
||||
{
|
||||
doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(onDone:)];
|
||||
|
||||
// this viewController can be displayed
|
||||
// 1- with a "standard" push mode
|
||||
// 2- within a segmentedViewController i.e. inside another viewcontroller
|
||||
// so, we need to use the parent controller when it is required.
|
||||
UIViewController* topViewController = (self.parentViewController) ? self.parentViewController : self;
|
||||
topViewController.navigationItem.rightBarButtonItem = doneButton;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
@@ -61,21 +73,15 @@
|
||||
|
||||
// Setup `RoomSettingsViewController` properties
|
||||
self.rageShakeManager = [RageShakeManager sharedManager];
|
||||
|
||||
[self addDoneButton];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(onDone:)];
|
||||
doneButton.tintColor = VECTOR_GREEN_COLOR;
|
||||
|
||||
// this viewController can be displayed
|
||||
// 1- with a "standard" push mode
|
||||
// 2- within a segmentedViewController i.e. inside another viewcontroller
|
||||
// so, we need to use the parent controller when it is required.
|
||||
UIViewController* topViewController = (self.parentViewController) ? self.parentViewController : self;
|
||||
topViewController.navigationItem.rightBarButtonItem = doneButton;
|
||||
[self addDoneButton];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didMXSessionStateChange:) name:kMXSessionStateDidChangeNotification object:nil];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user