標題幾乎可以說明一切,我是Xcode的新手,並且試圖製作一個改變視圖背景圖像的按鈕。我將有三個按鈕,當你點擊一個按鈕時,他們將改變與按鈕相關的背景。我怎麼做到這一點?我環顧四周,但沒有發現任何相關的或任何工作.. 在此先感謝!使用按鈕單擊更改iOS應用程序的背景圖像
編輯::
至於我有什麼,我有一個項目成立了一個窗口和一個名爲背景圖像一個視圖「默認@ 2X-568h @ 2x.png」我想是能夠按下按鈕並將其切換到「second.png」。我有一個按鈕,我控制拖入我的.h這使得這個:
@interface TeslameterViewController : UIViewController <CLLocationManagerDelegate> {
IBOutlet UIButton *button1;
}
- (IBAction)button1:(id)sender;
@end
這就是我失去了。
再次編輯:
發現通過這個視頻的修復:
http://www.youtube.com/watch?feature=player_embedded&v=iKuGiJMgMiQ
您是否添加了按鈕操作? – Rox
在這裏看:http://stackoverflow.com/questions/8077740/how-to-fill-background-image-of-an-uiview/8077854#8077854 – Chris