Browse Source

web for ipad

Marino Faggiana 8 years ago
parent
commit
b4c005e7a5
2 changed files with 11 additions and 4 deletions
  1. 1 1
      iOSClient/AppDelegate.m
  2. 10 3
      iOSClient/Main/CCMain.m

+ 1 - 1
iOSClient/AppDelegate.m

@@ -427,7 +427,7 @@
 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
 {
     
-#ifdef OPTION_NOTIFICATION_PUSH_ENABLE
+#if defined(OPTION_NOTIFICATION_PUSH_ENABLE) || defined(DEBUG)
     
     NSDictionary *keys = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:k_nextcloudDevicePushKey ofType:@"plist"]];
     

+ 10 - 3
iOSClient/Main/CCMain.m

@@ -3306,9 +3306,16 @@
 
 - (void)goToWebVC:(CCMenuItem *)sender
 {
-    SwiftWebVC *webVC = [[SwiftWebVC alloc] initWithUrlString:sender.argument];
-    
-    [self.navigationController pushViewController:webVC animated:YES];
+    if (self.splitViewController.isCollapsed) {
+        
+        SwiftWebVC *webVC = [[SwiftWebVC alloc] initWithUrlString:sender.argument];
+        [self.navigationController pushViewController:webVC animated:YES];
+        
+    } else {
+        
+        SwiftModalWebVC *webVC = [[SwiftModalWebVC alloc] initWithUrlString:sender.argument];
+        [self presentViewController:webVC animated:YES completion:nil];
+    }
 }
 
 #pragma --------------------------------------------------------------------------------------------