I have a navigation controller which acts as an rootViewController and I have one view controller which is presented modally (not pushed). So my control reaches app delegate while this presented viewController is the one, which is visible. So my question is, how can I get this viewController in appDel? And, No, its not my rootViewController and is not present in navigation stack.
Asked
Active
Viewed 1,290 times
1 Answers
0
I believe yo may use presentedViewController property of rootViewController. Check this answer for more details: https://stackoverflow.com/a/12684721/1301013

Community
- 1
- 1

Aouiaiauo Eyjaajeyio
- 346
- 6
- 11
-
Not working for me, its always returning me the navigation controller not the presented one. – Rana Oct 27 '14 at 12:11
-
Right, that answer is incomplete and there is a complete one down the same thread. It takes into account navigation and popover controllers: http://stackoverflow.com/a/20515681/1301013 – Aouiaiauo Eyjaajeyio Oct 27 '14 at 12:18