【发布时间】:2011-05-31 13:07:40
【问题描述】:
我有一个自定义对象,例如:
#import <Foundation/Foundation.h>
@interface FaxRecipient : NSObject {
NSString * contactID;
NSString * name;
NSString * fax;
NSString * company;
NSString * phone;
}
@property(nonatomic,retain)NSString *contactID;
@property(nonatomic,retain)NSString *name;
@property(nonatomic,retain)NSString *fax;
@property(nonatomic,retain)NSString *company;
@property(nonatomic,retain)NSString *phone;
@end
我有一个包含 FaxRecipient 对象的 NSMutableArray (remoteRecipientItems) 数组。
但是我试图通过使用名称来设置 UITableView 单元格的值:
[[cell textLabel]setText:[remoteRecipientItems objectAtIndex:[indexPath row]]]; //I want to only use the name value of FaxRecipient. Sorry for the newbie question.
【问题讨论】: