![](/img/trans.png)
[英]How to create a popup for the UITableViewCell like in Music App on iPhone (iOS 5)
[英]How to create numbers with rounded background in UITableViewCell (like the email app)?
在電子郵件應用程序的概述頁面上,您可以看到帳戶中新電子郵件數量的摘要。 有誰知道如何在圓形背景上創建數字?
它不是內置的單元格樣式,但應該很容易模仿。
將UILabel
添加到單元格中,設置其font
, textColor
和backgroundColor
。 要獲得圓角,請使用label.layer.cornerRadius
。
如果你在TUAW上閱讀這篇文章,你可以獲得更多關於你的問題的信息......
http://www.tuaw.com/2010/01/07/iphone-devsugar-simple-table-badges/
Tim Grant Davies創建了一個開源項目來做你想做的事情,它可以在github的CC License下獲得......你可以在這里下載: https : //github.com/tmdvs/TDBadgedCell
希望這可以幫到你 :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.