1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>

Lesson 4 - Transitioning Between Views

PDFPrintE-mail

The first thing we are going to do is change our “Hello World” text to say something that sounds more like navigation. Go ahead and open RootViewController.m. Location the cellForRowAtIndexPath method (it’s the one that you edited to display “Hello World” in the table cell.

Change the line: [cell setText:@"Hello World"] ; to [cell setText:@"Next View"];

Add A New View

We will now add the view that we will be transitioning to. Click on RootViewController.xib and this should open up Interface Builder. We don’t actually need to edit this file. Once inside Interface Builder click on File -> New and select View.
























It will add a blank View to your project. For now, we will keep it simple. Go ahead and drag a new Labelon to the View. Double click on the label and change the text to whatever you want. I set mine to View 2 (I know, not very imaginative).

 

TO BE CONTINUED...