iphone - push view when touchesBegan -
I have a navigation controller app, when the user is in a specific view, he can touch a scalp and I want to push the rootview controller, so, I have the equculued component, and in the "touch" method, I have to push the rootview controller, but I do not have access to the navigation controller! How can i do
Create two example variables in your sub-class UIScrollView:
ID representative; SEL touch action;
Then create methods:
- (zero) setTarget: (ID) target and verb: (SEL) verb {representative = target; Touch action = action; } - (zero) call action {if (Representative & representative representative replies: touch action)) {[Representative Performance Selector: Touch Action]; }}
In your touch, just call this method:
... [call auto action]; ...
In your UIViewController class create method:
- (zero) myScrollViewTouchAction {[self.navigationController pushViewController: myNewViewController Animated: Yes]; }
And in the end, when you make an example of your UIScroll subclass, then make it objective and functional:
[myScrollView setTarget: self andAction: @selector (MyScrollViewTouchAction)];
Comments
Post a Comment