views:

148

answers:

1

Hello, I have a problem... In my view i have ImageView.If i click ,it should open nextview.

Please help in this issue.

+2  A: 

override

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

method of your UIImageView (UIView, actually, but UIImageView is a subclass of UIView). This will handle UIImageView touches, so when user taps on this UIImageView, this method will be invoked.

In this method you should show next view with

[self.delegate.navigationController pushViewController:expenseListViewController animated:YES];

if you are subclassing your view controller from UINavigationController, or

[self.delegate presentModalViewController:controller animated:YES];

If you are sublclassing if from UIViewController.

Your_UIImageView delegate should be set to UIViewController object.

kovpas