diff options
Diffstat (limited to 'CyteKit/ViewController.mm')
-rw-r--r-- | CyteKit/ViewController.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index a25da53..3d22f60 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -59,6 +59,14 @@ extern bool IsWildcat_; [modal unloadData]; } +- (UIViewController *) parentOrPresentingViewController { + if (UIViewController *parent = [self parentViewController]) + return parent; + if ([self respondsToSelector:@selector(presentingViewController)]) + return [self presentingViewController]; + return nil; +} + @end @implementation CyteViewController |