0
通过我的搜索,我一直无法找到我的答案。表视图单元格像笔记应用程序
基本上我有一个像视图控制器的基本笔记。我希望效果如同笔记,其中第一行是音符的标题,其余的正文在副标题尾部。
我怎么把它设置:
NSString *note = nil;
if (tableView == self.tableView) {
note = [noteArray objectAtIndex:indexPath.row];
}
NSString *date = [dateArray objectAtIndex:indexPath.row];
NSInteger charnum = [note length];
if (charnum >= 22) {
cell.textLabel.text = [[note substringToIndex:18] stringByAppendingString:@"..."];
}
else{
cell.textLabel.text = note;
}
[cell.detailTextLabel setText:[NSString stringWithFormat:@"%@ - %@", date, [note substringFromIndex:18]]];
[cell.detailTextLabel setNumberOfLines:1];
现在它读取到18个字符,然后... ...和字幕把它捡起其余部分。
我该如何设置标题/标题,然后为此设置正文?