ipup / PPRevealSideViewController

A new container controller to easily push views on side like Path or Facebook
www.ipup.pro
Other
821 stars 194 forks source link

How we can get the topViewcontroller? #73

Closed tikamchandrakar18 closed 11 years ago

tikamchandrakar18 commented 11 years ago

Required : In my app I want to refresh present viewcontroller if application come from background to Foreground.

In this app we are unable to find the topViewController class.

Please suggest me how I can get the topViewcontroller class.

Thanks Tikam

ipodishima commented 11 years ago

Hi

What do you mean with topViewController? You have 'rootViewController' property or a getter for the current opened controller.

tikamchandrakar18 commented 11 years ago

Mean any class which is top. Suppose my rootviewcontroller is MainViewController In this screen i pushed new class , I want to the name of new class which is on top.

Thanks Tikam

ipodishima commented 11 years ago

So, this is absolutely not related to PPReveal...

Please take a look at https://github.com/ipodishima/PPTopMostController

ipodishima commented 11 years ago

Is that good?

tikamchandrakar18 commented 11 years ago

I got the solution for that :+1:

[5:11:49 PM] tikamchandrakar_IOS:

UINavigationController root = (UINavigationController )[self.revealSideViewController rootViewController];
topController = [root topViewController]; DebugLog(@" TopController %@",topController );

Thanks Tikam