Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(id)initWithUserName:(NSString *)name andPassword:(NSString *)password {
- self = [super init];
- if (nil == self) {
- return nil;
- }
- // display or store login info somewhere
- [someLabel setText:name];
- return self
- }
- [[UIApplication sharedApplication] delegate]
- // Get the string from the server
- NSString *string = [get string from server];
- // Create the second controller
- SecondViewController *controller = [[SecondViewController alloc] initWithNibName:@"nibname" bundle:nil];
- // Set the text property of a label in the controller
- controller.myLabel.text=string;
- // Add the view to the window so we can see it
- [[[[UIApplication sharedApplication] delegate] window] addSubview:controller.view];
- @interface SecondViewController {
- UILabel *myLabel;
- }
- @property (nonatomic, retain) IBOutlet UILabel *myLabel;
- @end
- NSString *str1 = @"Apple";
- NSString *str2 = @"Orange";
- if([str1 isEqualToString: str2]) {
- }else{
- }
Add Comment
Please, Sign In to add comment