Merge pull request #325 from nextcloud/fix-modal-views-ios13

Fix modal views in iOS 13
This commit is contained in:
Ivan Sein 2020-06-09 10:57:38 +02:00 коммит произвёл GitHub
Родитель 2a3cbe706f 7af372cea5
Коммит 208b81f63a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -31,6 +31,9 @@ NSString * const kNCAuthTokenFlowEndpoint = @"/index.php/login/flo
self = [super init];
if (self) {
self.serverUrl = serverUrl;
if (@available(iOS 13.0, *)) {
self.modalPresentationStyle = ([[NCDatabaseManager sharedInstance] numberOfAccounts] == 0) ? UIModalPresentationFullScreen : UIModalPresentationAutomatic;
}
}
return self;

Просмотреть файл

@ -81,6 +81,8 @@ typedef NS_ENUM(NSInteger, CallState) {
return nil;
}
self.modalPresentationStyle = UIModalPresentationFullScreen;
_room = room;
_displayName = displayName;
_isAudioOnly = audioOnly;

Просмотреть файл

@ -12,6 +12,7 @@
#import "AuthenticationViewController.h"
#import "LoginViewController.h"
#import "NCConnectionController.h"
#import "NCDatabaseManager.h"
#import "NCRoomsManager.h"
#import "NCSettingsController.h"
#import "JDStatusBarNotification.h"
@ -79,6 +80,9 @@
{
_loginViewController = [[LoginViewController alloc] init];
_loginViewController.delegate = self;
if (@available(iOS 13.0, *)) {
_loginViewController.modalPresentationStyle = ([[NCDatabaseManager sharedInstance] numberOfAccounts] == 0) ? UIModalPresentationFullScreen : UIModalPresentationAutomatic;
}
[_mainNavigationController presentViewController:_loginViewController animated:YES completion:nil];
}