Monday, 4 February 2013




HI THIS TOUTORIAL WILL HELP FULL FOR STARTUP IN IOS CREATED BY NAVEENRAJU



IOS BASICS EXPLINATIONS BY NAVEENRAJU

OBJECTIVE C

  • Introduction to Objective-c programming
  • Primitive Data Types and Operators
  • Flow Control Statements
  • Arrays and Structures
  • Classes, Objects, and Messaging
  • Memory Management and Properties
  • Inheritance, Polymorphism
  • Protocols and Categories
  • Introduction to Foundation Framework Classes
  • File Handling
  • Property Lists, NSCopy, and Archiving
  • Selectors and Targets
  • Dynamic Typing and Dynamic Binding

  • INTRODUCTION TO OBJECTIVE-C PROGRAMMING



Flow Control Statements:


















code for above video:



VIEWCONTROLLER.m



//  ViewController.m
//  FlowControlDemo
//
//  Created by apple on 04/02/13.
//  Copyright (c) 2013 apple. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
    
    //if else statements
    int x=3;
    
    if(x==5)
    {
    
        NSLog(@"if else The num is 5 ");
    }
    
    else{
        NSLog(@"if else The num is other than num 5");
    }
   
    
    //if else ladder
    
    int y=4;
    
    if(y==1)
    {
        NSLog(@"if else ladder the num is 1");
    
    }
    else if(y==2)
    {
    
        NSLog(@"if else ladder  The numm is 2");
    }
    
    
    else if(y==3)
    {
        
        NSLog(@"if else ladder  The numm is 3");
    }
    else if(y==4)
    {
        
        NSLog(@"if else ladder The numm is 4");
    }
    else if(y==5)
    {
        
        NSLog(@"if else ladder  The numm is 5");
    }
    else if(y==6)
    {
        
        NSLog(@"if else ladder  The numm is 6");
    }
    else if(y==7)
    {
        
        NSLog(@"if else ladder  The numm is 7");
    }
    else if(y==8)
    {
        
        NSLog(@"if else ladder  The numm is 2");
    }
    
    else if(y==9)
    {
        
        NSLog(@"if else ladder  The numm is 9");
    }
    else if(y==10)
    {
        
        NSLog(@"if else ladder  The numm is 10");
    }

    
    
    int z=2;
    
    switch (z) {
        case 1:
            NSLog(@"switch The num is 1");
            break;
            
        case 2:
            NSLog(@"switch The num is 2");
            break;
            
        case 3:
            NSLog(@"switch The num is 3");
            break;
        case 4:
            NSLog(@"switch The num is 4");
            break;
        case 5:
            NSLog(@"switch The num is 5");
            break;

        default:
            NSLog(@"switch the num should be 1 or 2 or 3 or 4 or 5");
            break;
    }
    
    

for (int a=1; a<=10; a++) {
    
    if(a==5)
    {
        continue; //skip to inital point
    }
  
    NSLog(@"%i",a);
}





}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

No comments:

Post a Comment