mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
26 lines
736 B
Mathematica
26 lines
736 B
Mathematica
![]() |
//
|
||
|
// UIViewController+OSKUtilities.m
|
||
|
// Overshare
|
||
|
//
|
||
|
// Created by Jared Sinclair on 10/16/13.
|
||
|
// Copyright (c) 2013 Overshare Kit. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "UIViewController+OSKUtilities.h"
|
||
|
|
||
|
@implementation UIViewController (OSKUtilities)
|
||
|
|
||
|
+ (UIViewController *)osk_parentMostViewControllerForPresentingViewController:(UIViewController *)presentingVC {
|
||
|
UIViewController *parentMostVC = presentingVC;
|
||
|
UIViewController *nextViewController = presentingVC;
|
||
|
while (nextViewController.parentViewController != nil) {
|
||
|
nextViewController = nextViewController.parentViewController;
|
||
|
if (nextViewController) {
|
||
|
parentMostVC = nextViewController;
|
||
|
}
|
||
|
}
|
||
|
return parentMostVC;
|
||
|
}
|
||
|
|
||
|
@end
|