
Untitled
By: a guest on
Aug 30th, 2012 | syntax:
Objective C | size: 0.64 KB | hits: 25 | expires: Never
in ConnectionObject.h
@property (nonatomic, strong) NSString *address
...
-(id)initWithAddress:(NSString *)address hostName:(NSString *)hostname port:(NSString *)port socket:(NSString *)socket;
in ConnectionObject.m
-(id)initWithAddress:(NSString *)address hostName:(NSString *)hostname port:(NSString *)port socket:(NSString *)socket {
if (self = [super init]) {
self.address = address;
...
}
return self;
}
in place where your data coming to you...
ConnectionObject *object = [ConnectionObject alloc] initWithAddress:address hostName:hostname port:port socket: socket];
[connectionArray insertObject:object];