2009-07-27 18 views
3

SDK3.0の廃止になってしまいました。iPhone SDK 3.0 UITableViewCellの廃止予定。テキスト

@property (nonatomic, retain) UIImage *rowImage; 

の私の宣言は動作しません、また@synthesizeが適切にこれを処理しないので

@property (nonatomic, readonly, retain) UIImage *rowImage; 

とI

@synthesize rowImage; 

は、私は自分のセッターを記述する必要がありますか?場合

<hr> 

cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:RootViewControllerCell] autorelease]; 


// Dpericated in SDK 3.0 <br> 
//<br> 
//cell.text = controller.title;<br> 
//cell.image = controller.rowImage;<br> 

// Using what the documentation says to use 
Error===> cell.textLabel = controller.title;<br> 
Error===> cell.imageView = controller.rowImage;<br> 

Error: Object cannot be set - Either readonly property or no setter found. 

希望があれば、どんな助力もありがたいです。

答えて

3

は非非推奨を使用します。

cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:RootViewControllerCell] autorelease]; 

その後:

あなたはまた、通常の構文を。使用することができます
[[cell textLabel] setText:[controller title]]; <br> 
[[cell imageView] setImage:[controller rowImage]]; 
+0

BrianSlickに非常に感謝してし – djt9000

3

cell.textLabel.text = controller.title; 
関連する問題