I am writing my first iPhone App, a test case before I write my life saving app to help me learn how things are done on this platform. So I used the standard ModelViewController widget and created my app. I put my UI on the default view and added all the glue code in the ViewController.m/.h files: event handlers, IBOutlet mappings to change my controls' state, etc. This all worked wonderfully and didn't take too long to do.
Now I want to add an info page to my application. I added an i button to my main page and mapped it to an empty handler, toggleCreditsOpen:, and then created a new view for my project, "info.xib". I opened interface builder and set up my view to my liking (though I would prefer if the credits could be loaded dynamically rather than directly in the view, I'll worry about that later as I'm pretty sure it's easy to change the text, and I just hope it's just as easy to load from a localized resource file, but that's not my question). I created a Done button in my info.xib and mapped that to another handler, toggleCreditsClosed. So now I have these two empty handlers: one when the info button is pressed, and one when the done button in the info window is pressed:
- (IBAction) toggleCreditsOpen: (id) sender {
// ???
}
- (IBAction) toggleCreditsClosed: (id) sender {
// ???
}
If anyone can explain what goes in these two functions, I will not be the only one grateful since I will put these instructions in an upcoming blog entry explaining how to do this so that people don't have to bash their heads against the table like me trying to put that final touch to their app: the credits!