в соответствии с примером предполагают, что я должен переопределить drawContentView
если я хочу добавить UIView в ячейку. не могли бы вы показать мне пример, пожалуйста?
- (void)drawContentView:(CGRect)rect {
UIColor * textColour = [UIColor blackColor];
if (self.selected) {
textColour = [UIColor whiteColor];
[[UIImage imageNamed:@"selectiongradient.png"] drawInRect:rect];
}
[textColour set];
UIFont * textFont = [UIFont boldSystemFontOfSize:22];
CGSize textSize = [text sizeWithFont:textFont constrainedToSize:rect.size];
[text drawInRect:CGRectMake((rect.size.width / 2) - (textSize.width / 2),
(rect.size.height / 2) - (textSize.height / 2),
textSize.width, textSize.height)
withFont:textFont];
}