如何在不使用自定義單元格的情況下重現消息UITableViewCell樣式?重現UITableViewCell樣式
目前,我使用的是UICellStyleWithSubtitle,並添加了附件,但我只能看到日期,並且隱藏了UITableViewCellAccessoryDisclosureIndicator。
我想要什麼:
http://www.askdavetaylor.com/4-blog-pics/iphone-text-txt-message-haiti-2.png
我在做什麼:
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 45, 15)];
[myLabel setText:[NSString stringWithFormat:@"%@", [table returnDate]]];
[myLabel setAdjustsFontSizeToFitWidth:YES];
[myLabel setTextColor:[UIColor blueColor]];
[myLabel setBackgroundColor:[UIColor clearColor]];
cell.accessoryView = myLabel;
[myLabel release];
cell.textLabel.text = table.title;
cell.detailTextLabel.text = table.subtitle;
是,但我不能添加字幕,然後。 –
這裏你把標籤設置爲_accessoryView_,所以它隱藏了指標。嘗試將標籤添加爲_accessoryView_ ** subView **。 – Sisu