Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class NameItAsYouLike {
- public static UIViewController GetController(this UIView view)
- {
- UIResponder parent = view;
- while (parent != null) {
- parent = parent.NextResponder;
- if (parent is UIViewController) {
- return parent as UIViewController;
- }
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement