I have a apps with a navigation controller, when the user is in a specific view, He can touch a scollview and I want a push the rootViewController. So, I have subclasses uiscrollview, and in the method “touchesBegan”, I want a push the rootviewcontroller, but I don’t have access to the navigation controller! How I can do that?
Share
In your subclass of UIScrollView create two instance variables:
Then create methods:
In your touchesBegan just call this method:
In your UIViewController class create method:
and finally when creating instance of your UIScrollView subclass, set it target and action: