2010-04-09 21 views

回答

3

覆蓋

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

您的UIImageView的方法(UIView的,實際上,卻是UIImageView的UIView的一個子類)。這將處理UIImageView觸摸,所以當用戶點擊這個UIImageView時,這個方法將被調用。

在這種方法中,你應該表現出與

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

下一個視圖,如果你是從UINavigationController的繼承您的視圖控制器,或

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

如果從UIViewController中sublclassing如果。

Your_UIImageView委託應該設置爲UIViewController對象。