就是想问这个问题。我可以在自定义单元格中使用 detailTextLabel 吗?我想在我的自定义单元格中显示其他信息。当我尝试使用 detailTextLabel 时,没有显示任何内容。
自定义单元格 .m 代码:
- (void)setUseDarkBackground:(BOOL)flag{
if (flag != useDarkBackground || !self.backgroundView)
{
useDarkBackground = flag;
NSString *backgroundImagePath = [[NSBundle mainBundle] pathForResource:useDarkBackground ? @"BGDark" : @"BGLight" ofType:@"png"];
UIImage *backgroundImage = [[UIImage imageWithContentsOfFile:backgroundImagePath] stretchableImageWithLeftCapWidth:0.0 topCapHeight:1.0];
self.backgroundView = [[[UIImageView alloc] initWithImage:backgroundImage] autorelease];
self.backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.backgroundView.frame = self.bounds;
}}