ios - Setting UILabel text from NSDictionary -
i have question. need setting text value uilabel nsdictionary.
my code set text uilabel is:
refunds *current = [refunds_view objectatindex:indexpath.row]; cell.sol_number.text = [nsstring stringwithformat:@"%@",current.company];
where current refunds.h
#import <foundation/foundation.h> @interface refunds : nsobject -(id)initwithjsondata:(nsdictionary*)data; @property (assign) nsnumber *refunds_id; @property (assign) nsnumber *request_number; @property (strong) nsstring *policy_code; @property (strong) nsstring *company; @end
refunds.m
#import "refunds.h" @implementation refunds @synthesize refunds_id; @synthesize request_number; @synthesize policy_code; @synthesize company; -(id)initwithjsondata:(nsdictionary*)data{ self = [super init]; if(self){ nslog(@"initwithjsondata method called "); refunds_id = [data valueforkey:@"id"]; request_number = [data valueforkey:@"request_number"]; policy_code = [data valueforkey:@"policy_code"]; company = [data valueforkey:@"company"]; } homecoming self; } @end
when seek set value uilabel no occurs error value doesn't show complete, show (
nslog(@"%@",[current company]); //this value of [current company] 2014-06-26 10:32:13.917 benefits[7178:70b] ( benefits ) cell.sol_number.text = [nsstring stringwithformat:@"%@", current.company];
any thought this.
thanks.
best regards.
i think need utilize company value rather "date" value..just it
cell.sol_number.text = [nsstring stringwithformat:@"%@",current.company];
ios nsdictionary
No comments:
Post a Comment