A development device [don’t need one, but recommended, and it needs to be registered as an iPhone Developer]

Some wits!

Let’s get started! I assumed you installed the SDK by now, if not, do it. Make a new project {Apple + Shift +N}, let’s name it “View-Based App”.

As a side note, you need to know what files do what. To start, all of the “.framework” files are the main framework and will “tell” Xcode what API’s are where. The Info.plist is the App’s “Hello my name is” card. As with all C-based executables, your app will have its “main.m” file, but like the “View_Based_App_Prefix.pch” it wont need editing unless you want to use other frameworks. The “MainWindow.xib” [it’s a nib by-the-way, but why xib?] and the “View_Based_AppViewController.xib” are the files generated by IB [Interface Builder] and contain the App’s interface, but for this app, we’ll stick to the “View_Based_AppViewController.xib”. The “View_Based_AppAppDelegate”, is, as you can see, the app’s delegate—everything goes by that file—last, but not least, the “View_Based_AppViewController” is the controller that controls your view [the XIB].

As you may have noticed, there are two main types of files: .m and .h. The .m are specific to Objective-C, which is a really powerful tool if you know how to use it correctly. The .h files are headers, where you declare objects (a button, label, toolbar, etc.) and functions.

Now that you understand what files are in your project, let’s start! Choose the “View_Based_AppViewController.h” file. We’ll want to add six buttons, and two labels like this:

Add the following text between the two brackets of the View_Based_AppViewController function:

Please note that the colors are really important and makes your life a whole lot easier.

The pink is for what type of declaration this is. In this case, it’s going to use Interface Builder. The purple color is for the type of UI [User Interface] item and the green is for the item’s name.

This is the [easy] [and fun] tricky part, once you’ve got all of your items setup. Please watch the following YouTube video I prepared for you guys, it will be easier to watch and redo then to read and redo. Don’t close IB yet, we’re not done with it, we need to open up Xcode [if you closed it].

Thanks for this post! My wife and I are ready to try something new, and we feel competent and creative enough to dive into the app world! “Competent” in that we are good with computers and picking up new things….BUT we have no programming or developing know how… Do you think this is possible and where do you think we should begin????

Fine tutorial, near as I can tell, but I’m afraid time has moved on. 1=No sound from YouTube video 1. I blew it up and watched a sufficient nmbr of times to discern whar you meant. I think. 2=No YouTube video at all for “do what I do here.” 3=un-ZIPed file didn’t execute anyway. Error was: “Code Sign error: the identity iPhone Developer doesn’t match any valid blah blah keychain.” Gotta tell you, I’m stuck.

Damn it was too good to be true the second video is dead no way to know what to do I’m fucked again. Can’t help, among all the tutos out there none has done the job yet. Either Xcode is new version or something like this happens.

Planet-iPhones.com is NOT affiliated with or representing Apple. iPhone, the "Apple" logo and any other product names, service names
or logos of iPhone used, quoted and/or referenced herein are trademarks or registered trademarks of Apple.