diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-12-23 22:41:50 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-12-23 22:52:05 -0800 |
commit | 19f2d77f02510fd14320166f45a33e6aa77cb396 (patch) | |
tree | 58faf4628aa9126578562691b4bff3b1fc39248e /CyteKit/ViewController.mm | |
parent | f9257f618734672534a3955c16aa83acfa5e1786 (diff) |
"Oh, my God... they killed parentViewController!"v1.1.3
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 |