18. Building our SUPER basic app 1/3

We have gone over most of the topics that we will need to build our basic app, so let's refresh on what our specs are for this app:

"Let's make an app where we have a label that displays a number. We will also have another label that displays a different message based on the number that is displayed. And then we will have a button that we will press in order to increment the value of the number label which will in turn change the message label."

I hope that you tried to make some of this on your own because that is the best way to solidify these concepts. Doing it yourself after learning makes it cemented in your brain.

Based on some of the work we have been doing so far, we should already have a pretty useful skeleton to work off of. Lets build this app in stages:

1. Layout the .xib file. I like to lay everything out in IB whenever I can because that helps me get an idea of what I'll need to do to hook everything up in code. If you haven't already, go ahead and make something that looks like the image below. Feel free to poke around with some of the different tools in IB to enhance it and make it look better.


Ok, that is pretty basic looking, but it will do. Like I said, feel free to play around with the IB controls a little to make it look better. Here is a break down of each IB element:

A - This is a UINavigationBar. You can click and drag this item from the IB library and put your own custom text and color onto it right away. It is a very standard element that everyone who uses an iPhone has grown used to.

B - The UILabel associated with our custom message we are going to display.

C - The UILabel associated with the current number.

D - The UIButton we are going to press in order to increment the count and get everything going.

So that is the basic view of our basic app. What do we do now? Well, now that we know what we want it to look like, it's pretty easy to see what is next. We need to hook everything up to the code side! How many IBOutlets are there going to be? How many IBActions? Think about that and I'll answer it in the next post!

No comments:

Post a Comment