forked from EthanArbuckle/Apollo-CustomApiCredentials
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
310 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@interface ShareUrlTask : NSObject | ||
|
||
@property (nonatomic) dispatch_group_t dispatchGroup; | ||
@property (nonatomic, strong) NSString *resolvedURL; | ||
|
||
@end | ||
|
||
@interface RDKLink | ||
@property(copy, nonatomic) NSURL *URL; | ||
@end | ||
|
||
@class _TtC6Apollo14LinkButtonNode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface UIWindow (Apollo) | ||
- (UIViewController *) visibleViewController; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#import "UIWindow+Apollo.h" | ||
|
||
// https://stackoverflow.com/a/21848247 | ||
@implementation UIWindow (Apollo) | ||
- (UIViewController *)visibleViewController { | ||
UIViewController *rootViewController = self.rootViewController; | ||
return [UIWindow getVisibleViewControllerFrom:rootViewController]; | ||
} | ||
|
||
+ (UIViewController *) getVisibleViewControllerFrom:(UIViewController *) vc { | ||
if ([vc isKindOfClass:[UINavigationController class]]) { | ||
return [UIWindow getVisibleViewControllerFrom:[((UINavigationController *) vc) visibleViewController]]; | ||
} else if ([vc isKindOfClass:[UITabBarController class]]) { | ||
return [UIWindow getVisibleViewControllerFrom:[((UITabBarController *) vc) selectedViewController]]; | ||
} else { | ||
if (vc.presentedViewController) { | ||
return [UIWindow getVisibleViewControllerFrom:vc.presentedViewController]; | ||
} else { | ||
return vc; | ||
} | ||
} | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters