The IF Conditional Statement in Coding
60 likes | 126 Vues
Learn how to use the IF condition in programming to control flow based on conditions. Explore key syntax and examples for effective implementation.
The IF Conditional Statement in Coding
E N D
Presentation Transcript
How to use IF If(Conditon){ statements }
Some important codes if ([text1.text isEqualToString:@"abc"]&&[text2.text isEqualToString:@"123"]) { *first=[[firstViewController alloc]initWithNibName:@"firstViewController" bundle:nil]; [self.view addSubview: first.view]; }
Some important codes else{ *second=[[secondViewController alloc]initWithNibName:@"secondViewController" bundle:nil]; [self.view addSubview:second.view]; }
How to use UIAlterView 1 What’s the AlterView? 2 Syntax format: UIAlterView *object name=[[UIAlterView alloc]initWithTitle:@”NSString” message:@”NSString” delegate:nil cancelBttonTitle:@”NSString” otherButtonTitles:nil];
How to use UIAlterView 3 how to show the AlterView [object name show];