我刚刚安装了 iPhone SDK 3.0,发现 UITableViewCell 的 text 属性不再使用了,应该使用 textLabel.text 代替。这是否意味着我必须知道当前的系统版本并调用相应的方法?像这样。
UITableViewCell *cell = ...;
if ([[[UIDevice currentDevice] systemVersion] isEqualToString:@"3.0"]) {
cell.textLabel.text = @"...";
} else {
cell.text = @"...";
}
如果是这样,那将是非常烦人的。