Вопрос

In a UITableViewCellDefault style, the title font is a 20 point Helvetica normal-style font with a bold weight. How can I create this same font in code?

I was thinking about creating an instance of UITableViewCell and copy it's font, but I won't be able to change the point size.

I found this on SO: Bold font with bold weight in iPhone but I'm looking for a regular font with bold weight.

Any ideas?

Это было полезно?

Решение

If you refer to the font name itself you can create them like so by using a dash:

[UIFont fontWithName:@"Helvetica-Regular" size:12]
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top