1
A
回答
0
在頭文件添加
{
IBOutlet UIButton *counterbutton;
}
-(IBAction)pushed:(id)sender;
在.m文件 詮釋計數;
-(IBAction)pushed:(id)sender
{
count = count + 1;
counterbutton.text = [NSString stringWithFormat:@"count is %i",count];
}
在界面生成器中,將按鈕連接到IBAction和IBOutlet的視圖控制器。
0
Flex_Addicted共享鏈接在我的問題,我猜在這裏分享更可辨別。在那個例子中,我完全顯示了我所要求的內容,並且只需在項目中添加h和m文件就非常簡單。 How can I add a badge to a standard UIButton?
相關問題
- 1. 如何創建Android通知?
- 2. 如何在ACTION_BATTERY_LOW時在通知欄中創建通知?
- 3. 如何在擺動中創建通知
- 4. 如何創建循環UIButton?
- 5. 在變量變化上創建通知
- 6. 創建通知在主屏幕上
- 7. 創建通知
- 8. 如何在UIButton中創建邊框?
- 9. 如何在設備上創建不同的通知並穿戴?
- 10. 如何在android中的按鈕上創建通知計數
- 11. 如何在Windows Mobile上創建通知彈出窗口?
- 12. 如何創建Cloud Web Service以在Windows Phone上推送通知?
- 13. 如何創建定時在主屏幕上彈出的通知?
- 14. 如何在通知管理器(Android)上創建動態ID?
- 15. 在UIButton上創建一個UIImageView點擊
- 16. 在yammer中創建通知
- 17. 在yii2中創建通知
- 18. 如何創建一個提醒通知
- 19. 如何從Chrome創建桌面通知?
- 20. 如何創建通知保證金
- 21. 如何創建「顯示通知」checkboxpreferene
- 22. 如何創建Rails的通知的URL
- 23. 如何創建彈出通知窗體?
- 24. 如何創建通知服務?
- 25. 如何創建多個通知?
- 26. 如何創建Facebook通知標題欄?
- 27. 如何從Phonegap創建Android通知?
- 28. 如何創建通知組OneSignal
- 29. 如何創建多個本地通知
- 30. 創建Cookie通知
http://stackoverflow.com/questions/4722669/how-can-i-add-a-badge-to-a-standard-uibutton –