This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 30th, 2012  |  syntax: Objective C  |  size: 0.64 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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];
clone this paste RAW Paste Data