How to create numbers with rounded background in UITableViewCell (like the email app)?

iphone, uitableview

Solution

It's not a built-in cell style but should be pretty easy to mimic.

Add a `UILabel` to the cell set its `font`, `textColor` and `backgroundColor`. To get the rounded corners, play with `label.layer.cornerRadius`.

Problem

In the email app, on the overview page, you can see a summary of the number of new emails you have in your accounts. Does anyone know how to create the numbers on the rounded background?

Original source