Let's start where we last left off. We had just finished creating all the buttons and writing the entire source code. And I specifically remember you smashing the keyboard against the ground and screaming, "Why isn't this working?" Fear not though, the answers you've been waiting for and the conclusion to your very first independent iPhone application is just around the corner. Alright, all you need to do is to go ahead and open up the Interface Builder file which, if I'm not mistaken, is named [iStartViewController.xib] or [MainWindow.xib]. You can open either one, it doesn't really matter. Once you've opened that up, go ahead and right click on the label first. You will see a little box pop up and there will be a little circle with the text "New Referencing Outlet" directly to its left. Click and hold the little circle and you will see a line. Drag and drop that line directly to the box with "File's owner." When you finish, you should see a box pop up with two things. The top thing should be "labelName" which is the variable we defined in our code. The second one is "view" and we won't be using that yet. Just click on the "labelName" and you should see an immediate change in the first box you opened. Again, if this is confusing to you, the video will help you a lot. What we just did is connect the label to the variable so we can modify it or get its value in the code. Without this link, we would have no connection to this outlet.
The next step is to connect our button to the method we defined in the code. Let's perform the same procedure. If you right click the button, you will notice something very different though. There are many more options this time. Scroll down and hit "Touch Up Inside." Then, drag to the File Owner and select the method we defined which was "buttonPressed." Then save up the file, and you're all ready to go. This is the conclusion to your very first iPhone application project. Look for the links at the side for video help. Thanks for reading and look forward to my next tutorials in which we explore more complex programs and how to connect to popular social networking sites such as Facebook and Twitter. Also, don't forget to comment, rate, and to ask any questions if you have them.
Published by Chris Chen
Chris is currently attending the University of California, Berkeley seeking an undergraduate's degree in Electrical Engineering Computer Science. He enjoys playing basketball, practicing kendo, hanging out w... View profile
How to Recycle If You Don't Have Curbside PickupThere's really no excuse for not recycling if you have curbside pickup. - What to Do If You Are Depressed Over the HolidaysMany people believe that everyone else is living the Norman Rockwell Holiday. The truth is many people aren't. If you are one this may help you.
- Secessionists and Troublemakers Go Ahead and Leave the Union
- Go Ahead and Just Do It
- Go Ahead and Go Bananas: It's Good for Your Health!
- How to Know If You Can Sing: Ten On-Key Tips
- How to Know If You Are a Good Person: Ten Clear Signs
- What to Do If You Can No Longer Afford Your Pet: Five Clear Choices
- What to Do If You Discover Your Wife is Cheating on You: Ten Suggestions



