SHARE
TWEET

Untitled

a guest Apr 21st, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(id)initWithUserName:(NSString *)name andPassword:(NSString *)password {
  2.     self = [super init];
  3.     if (nil == self) {
  4.         return nil;
  5.     }
  6.  
  7.     // display or store login info somewhere
  8.     [someLabel setText:name];
  9.  
  10.     return self
  11. }
  12.    
  13. [[UIApplication sharedApplication] delegate]
  14.    
  15. // Get the string from the server
  16. NSString *string = [get string from server];
  17.  
  18. // Create the second controller
  19. SecondViewController *controller = [[SecondViewController alloc] initWithNibName:@"nibname" bundle:nil];
  20.  
  21. // Set the text property of a label in the controller
  22. controller.myLabel.text=string;
  23.  
  24. // Add the view to the window so we can see it
  25. [[[[UIApplication sharedApplication] delegate] window] addSubview:controller.view];
  26.    
  27. @interface SecondViewController {
  28.   UILabel *myLabel;
  29. }
  30.  
  31. @property (nonatomic, retain) IBOutlet UILabel *myLabel;
  32.  
  33. @end
  34.    
  35. NSString *str1 = @"Apple";
  36. NSString *str2 = @"Orange";
  37.  
  38. if([str1 isEqualToString: str2]) {
  39.  
  40. }else{
  41.  
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top