فهرست منبع

OneDrive support: don't assume that delegate is a view controller change login method signature to pass the view controller which should present the LiveSDK login view controller

Tobias Conradi 10 سال پیش
والد
کامیت
213b8ff3a8
3فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      Sources/VLCOneDriveController.h
  2. 2 2
      Sources/VLCOneDriveController.m
  3. 1 1
      Sources/VLCOneDriveTableViewController.m

+ 1 - 1
Sources/VLCOneDriveController.h

@@ -23,7 +23,7 @@
 
 + (VLCOneDriveController *)sharedInstance;
 
-- (void)login;
+- (void)loginWithViewController:(UIViewController*)presentingViewController;
 
 - (void)downloadObject:(VLCOneDriveObject *)object;
 

+ 2 - 2
Sources/VLCOneDriveController.m

@@ -79,9 +79,9 @@
     return _activeSession;
 }
 
-- (void)login
+- (void)loginWithViewController:(UIViewController *)presentingViewController
 {
-    [_liveClient login:self.delegate
+    [_liveClient login:presentingViewController
                 scopes:_liveScopes
               delegate:self
              userState:@"login"];

+ 1 - 1
Sources/VLCOneDriveTableViewController.m

@@ -125,7 +125,7 @@
 {
     if (![_oneDriveController isAuthorized]) {
         self.authorizationInProgress = YES;
-        [_oneDriveController login];
+        [_oneDriveController loginWithViewController:self];
     } else
         [_oneDriveController logout];
 }