是否可以手動將圖像分配給iphone sdk中的按鈕。我想要做的是給一個按鈕分配一個普通的卡片背景。當用戶點擊按鈕時,選擇器出現,用戶使用選取器選擇按鈕圖像到選定的卡上?我已經將所有卡片保存在我的資源中。Iphone中的按鈕
0
A
回答
0
可以在圖像視圖中使用的圖像,然後在此圖像使用自定義按鈕和點擊這個按鈕的IBAction爲將調用想 - (IBAction爲)調用 { myPicker.hidden = NO; } and in viewWillAppear myPicker.hidden = YES;
並使用選擇器視圖委託方法爲您的邏輯選擇器視圖。
3
嘗試fiollowing代碼:
btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setBackgroundImage:[UIImage imageNamed:@"any.png"] forState:UIControlStateNormal];
[btn setBackgroundImage:[UIImage imageNamed:@"any_on.png"] forState:UIControlStateHighlighted];
相關問題
- 1. iPhone中的拖動按鈕
- 2. iPhone中的按鈕圖像
- 3. Iphone中的分組按鈕
- 4. iPhone在按鈕上按下按鈕
- 5. iPhone按鈕選中狀態
- 6. iphone - 同時按下按鈕
- 7. 按下iPhone主頁按鈕
- 8. iPhone識別按鈕按下
- 9. iPhone:按下按鈕 - >居中地圖
- 10. iphone待機按鈕
- 11. iPhone,時尚按鈕?
- 12. iPhone按鈕問題
- 13. iPhone圖像按鈕
- 14. iPhone分享按鈕
- 15. iPhone位置按鈕
- 16. 動態按鈕/ iPhone
- 17. iPhone按鈕動作
- 18. iPhone取消按鈕
- 19. iphone中的按鈕的觸摸效果
- 20. 如何使iphone中的單選按鈕和複選框按鈕?
- 21. 靈活的iPhone按鈕
- 22. iPhone上的放大按鈕
- 23. iphone:彈出按鈕的UIWebView
- 24. openGL和iPhone上的按鈕
- 25. iPhone Facebook的'喜歡'按鈕
- 26. iPhone風格的按鈕
- 27. iPhone上的漢堡按鈕
- 28. 檢測IPads/IPhone電源按鈕和IPad/IPhone按鈕
- 29. iphone/ios中心的按鈕文字
- 30. 如何比較iPhone中的按鈕框?
感謝。你的意思是「減量法」? – user903785 2010-12-01 12:50:50