I have a TableViewController that is a subclass of PFQueryTableViewController
.
It displays dynamic TableViewCells that are subclasses of PFTableViewCell
, and have 2 custom properties of type IBOutlet UILabel
.
Both are set up in storyboard, as in the following picture.
The backgrounds of the different views have been colored to make the views visible. Please note that the text size of both labels is set the same, 12pt.
In tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object
I set both labels by
cell.dateLabel.text = stringFromDate; // the date is set earlier
cell.activityLabel.text = @"Test";
Now when I run the app, the following picture is displayed:
Please note that 1) the text is written correctly, but 2) the backgrounds are not colored, 3) only the date field has a text size of 12 pt whereas the activity label has a size of 17 pt, 3) the height of the activity label is not as defined in storyboard but smaller.
Of course, the cell label is set correctly and the „right“ cell is dequeued (otherwise I could not access the custom properties). Also the properties are linked correctly (otherwise the text would not be displayed correctly).
In my table view controller, I don’t have any delegate methods that overwrite the storyboard settings of the table view cell.
So my question is:
Why are the storyboard settings for my table view cell only partly used (the text size of the 1st label) but most of them ignored (the background colors, the height and the text size of the 2nd label), and what do I have to do to make it work correctly?