I have a custom object like:
#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
I have an array of NSMutableArray (remoteRecipientItems )containing FaxRecipient objects.
However I am trying to just set the value of a UITableView cell by using the name:
[[cell textLabel]setText:[remoteRecipientItems objectAtIndex:[indexPath row]]]; //I want to only use the name value of FaxRecipient. Sorry for the newbie question.
FaxRecipient *faxObject= [remoteRecipientItems objectAtIndex:indexPath.row];//This is ur object
cell.textLabel.text=faxObject.name;//this sets the name
精彩评论