У меня есть класс, подобный следующему
@interface Node : NSObject {
NSString* description;
NSString* ae;
NSString* ip;
NSString* port;
}
@property ( nonatomic , retain ) NSString* description;
@property ( nonatomic , retain ) NSString* ae;
@property ( nonatomic , retain ) NSString* ip;
@property ( nonatomic , retain ) NSString* port;
@end
#import "Node.h"
@implementation Node
@synthesize description,ae,ip,port;
@end
Я хочу создать из него nsmutablearray. Итак, я делаю следующее
NSMutableArray* nodesArray ;
nodesArray = [[NSMutableArray alloc] init];
Node * insertedNode =[[Node alloc]init] ;
insertedNode.description =@"test";
insertedNode.ae =@"test" ;
insertedNode.ip =@"test";
insertedNode.port =@"test";
[nodesArray addObject: insertedNode] ;
[insertedNode release];
, затем печатаю счет, используя
NSLog(@"%d",[nodesArray count] ) ;
но он всегда всегда возвращает 0
любое предложение, чтобы решить, что
С уважением