RoomParticipantsViewController: Add possibility to display cancel bar button.

This commit is contained in:
SBiOSoftWhare
2021-02-21 23:59:50 +01:00
parent 430f91929a
commit 67a1f36c11
2 changed files with 16 additions and 1 deletions
@@ -520,7 +520,15 @@
// Check whether the view controller is currently displayed inside a segmented view controller or not.
UIViewController* topViewController = ((self.parentViewController) ? self.parentViewController : self);
topViewController.navigationItem.rightBarButtonItem = nil;
topViewController.navigationItem.leftBarButtonItem = nil;
if (self.showCancelBarButtonItem)
{
topViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancel:)];
}
else
{
topViewController.navigationItem.leftBarButtonItem = nil;
}
}
- (void)onAddParticipantButtonPressed
@@ -1463,6 +1471,11 @@
}
}
- (void)onCancel:(id)sender
{
[self withdrawViewControllerAnimated:YES completion:nil];
}
#pragma mark -
- (void)didSelectInvitableContact:(MXKContact*)contact