我想在導航欄中顯示圖像,而不是帶有操作的後退按鈕。所以現在我已經使用了圖像視圖並在導航欄中顯示了圖像。現在我想在觸摸或單擊圖像視圖時編寫圖像視圖的操作。是否可以爲圖片視圖編寫動作?如何在iPhone-OS 4.0中觸摸圖像視圖時寫入操作
我目前在iPhone OS 4.0中工作。
這裏是我的代碼:
UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0,5,40,40)];
[self.navigationController.navigationBar addSubview:view1];
view1.backgroundColor = [UIColor clearColor];
UIImage *img = [UIImage imageNamed:@"Back.png"];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
[view1 addSubview:imgView];
我怎麼能寫圖像視圖的操作?