iOS sample project continued...now add the controls and code to it...




  • Click on XYZMyViewController.m in navigation area


  • Write the below highlighted code:


  • Code:

    @synthesize lblDisplayText;

    -(IBAction)btnDisplay:(id)sender
    {
    lblDisplayText.text =@ "HELLO WORLD!!";
    }

  • Go to XYZAppDelegate.m and write the below highlighted code:


  • Code:

    - (BOOL)application:(UIApplication
    *)applicationdidFinishLaunchingWithOptions:
    (NSDictionary *)launchOptions
    {
    self.window = [[UIWindowalloc]
    initWithFrame:[[UIScreenmainScreen] bounds]];
    // self.window.backgroundColor = [UIColorwhiteColor];
    XYZMyViewController
    *xyzMyViewController=[[XYZMyViewControlleralloc]init];
    self.window.rootViewController=xyzMyViewController;

    [self.windowmakeKeyAndVisible];
    returnYES;
    }

iOS sample project << Previous
Next >>iOS sample project


Support us generously: contact@lessons2all.com

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus


















Footer1