开发者

iPhone: UITableView number emails style used in Mail app

I am looking for how to style a label in a UITableView cell, so that it shows how ma开发者_JS百科ny children/messages are in the next view controller.

This is used in Apple's Mail app, to show how many messages are in the inbox or account.

I am sure that this is a UILabel, but what font, color and how to make the oval around it?


The font is surely bold Helvetica because that's what Apple uses everywhere in the iPhone UI. To get the exact color, you could take a screenshot and then sample the color with a color picker. For the rounded corners, experiment with a rather large label.layer.cornerRadius.


Instead of using UILabel.layer.cornerRadius, which results in terrible scrolling performance (as mentioned in my comment), subclass UILabel with a custom drawRect.

Here is the version that I use: http://gist.github.com/500793

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜