我剛剛安裝了iPhone SDK 3.0,發現UITableViewCell的text屬性不再使用,應該使用textLabel.text代替。這是否意味着我必須知道當前的系統版本並調用相應的方法?喜歡這個。iPhone SDK 3.0比。 2.2.1
UITableViewCell *cell = ...;
if ([[[UIDevice currentDevice] systemVersion] isEqualToString:@"3.0"]) {
cell.textLabel.text = @"...";
} else {
cell.text = @"...";
}
如果是這樣,那將是非常煩人的。
嗨,這可以用來devlop通用應用http://cocoabugs.blogspot.com/2010/09/utility-method-to-know-ios4-installed.html – 2010-09-07 13:25:14