Reputation: 358
I've got a tableView of type Plain
containing one PrototypeCell of Type Custom
. The prototype cells class is the default UITableViewCell
class, as I'm NOT using any specialized subclass.
The problem is, that I simply want to style the textlabels contained within the default UITableViewCell
(textLabel and detailTextLabel) by using UIAppearance
for iOS7.
I've tried
[[UILabel appearance]] appearanceWhenContainedIn:[UITableViewCell class], nil] setTextColor:UIColor.redColor];
to no avail. I know that the Apple documentation states, that the default labels mentioned above are always created with the default font and with textcolor black. However I expected, that styling the UILabels with appearance should work out. Any ideas regarding that topic?
REMARK: I know it's possible to set the textcolors usingcell.textLabel.textColor = UIColor.redColor
, but I want to define the styling once.
Upvotes: 4
Views: 1295
Reputation: 1865
If you want to use this two labels, you don't have a Custom
cell but a Subtitle
cell. And still you can change the properties of these labels in the IB.
Just double click on the labels to change their properties. (Or have a look in ContentView
on the left):
Upvotes: 2