views:

92

answers:

1

I'm a newbie programmer and I have played around with the SDK for a while. How do you create a homepage that has a button that will bring you to another view (the content of the app)??? If you know can you list the steps in order or link a tutorial site (It woul be awesome if the steps had code with it I needed). Thanks!

A: 

I would recommend getting a good book on iPhone programming. What you want to do is set up a UINavigationController, add the button to the first view, set the action of the button's touchUpInside to call the showContent method. Then implement the showContent method to push the Content view controller.

- (IBAction) showContent{
    ContentViewController *myContentController = [[ContentViewController alloc] init];
    myContentController.title = @"Content";
    [self.navigationController pushViewController:myContentController animated:YES];
    [myContentController release];
}

Have a read up on the documentation for pushViewController and UINavigationControllers, then follow this tutorial.

Jack
Ok thanks. The site is just what I needed
Da Coder
No worries, there are quite a few tutorials on the topic. My recommendation is that when you get taught something in a tutorial, read up in the documentation about a couple of the things that you learned about. Once you understand how to use the documentation, the world is your oyster.
Jack
How can you do it without having cells and stuff?
Da Coder
If you read my post it explains roughly what to do. Try working through that step by step. If you get stuck, post a new question. If you try and work through a good book, you will be amazed at how quickly things progress. 'Beginning iPhone Development' is a good start.
Jack
Here is another simple tutorial, work through it and try and merge it with what you have already. The code above might also be helpful.http://knol.google.com/k/iphone-sdk-helloworld
Jack
Thanks Again. Your awesome. ;-)
Da Coder