Advertisement
Guest User

Untitled

a guest
Aug 30th, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. in ConnectionObject.h
  3.  
  4. @property (nonatomic, strong) NSString *address
  5. ...
  6.  
  7. -(id)initWithAddress:(NSString *)address hostName:(NSString *)hostname port:(NSString *)port socket:(NSString *)socket;
  8.  
  9. in ConnectionObject.m
  10. -(id)initWithAddress:(NSString *)address hostName:(NSString *)hostname port:(NSString *)port socket:(NSString *)socket {
  11.     if (self = [super init]) {
  12.         self.address = address;
  13.         ...
  14.     }
  15.     return self;
  16. }
  17.  
  18. in place where your data coming to you...
  19. ConnectionObject *object = [ConnectionObject alloc] initWithAddress:address hostName:hostname port:port socket: socket];
  20.  
  21. [connectionArray insertObject:object];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement