iPhone and iPad Apps for Absolute Beginners, iOS 5 Edition by Lewis Rory

iPhone and iPad Apps for Absolute Beginners, iOS 5 Edition by Lewis Rory

Author:Lewis, Rory [Lewis, Rory]
Language: eng
Format: mobi, epub
Publisher: Apress
Published: 2011-12-27T16:00:00+00:00


Coding the Second View

Now let's write some code to make use of this new Outlet. To do so, select the file SecondViewController.m in the Navigator and find the method definition for viewDidLoad. It should look something like this:

- (void)viewDidLoad

{

[superviewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

}

Add the lines in bold below, so that the method reads as follows (be sure to change myImage appropriately if you named your Outlet something different). Unless you named your image PIC02, you will have to change the text in quotes to the name of your image (without the “.png”):



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.