All Posts

Welcome!

Tweet Welcome to the new blog. Let me give you a little background of what I want to do with this blog. I want to create a blog that teaches people with some programming knowledge on how to program objective C for the Iphone. I come from a mostly PHP, Pyhton and C++ (Qt widget set) background. I am also the lead developer for Photoblog and was looking to create a Iphone app to tie into the site.

Switch to Tab Bar Application

Tweet I am now going to switch this to a Tab Bar Application. I feel this is best for my application at this point. The tab bar type of application lets you have a static menu at the bottom of the screen so the user can easily navigate from option to option. So here is the setup when you go to File -> New Project All I did here was setup my icon file.

Setup your development enviroment

Tweet I am assuming that you have the Iphone SDK installed. If you need help with getting that installed or do not know what a SDK is then this blog will probably be over your head. So first thing is to start Xcode. I have mind in the menu bar (sorry I am not a Mac person so I have no clue what it is called ) Once Xcode is started you will be greated with the opening screen that looks like this.

Intro to Inferface Builder

Tweet So now that you have gotten your hands a bit dirty in the code, lets learn about Interface Builder. If you noticed when you launched your application, there was a blue/white gradient that was blank. So lets do a quick tutorial on how to populate that in Interface Builder. So in the files section in xcode you will see a MainWindow.xib. If you double click that it will launch Interface Builder.

Creating Hello World

Tweet So like every good tutorial we need to create a Hello World application. We will use what we have learned in the past tutorials and build on them. So the first thing you want to do is open the file RootViewController.m Look for the following code block - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 0; } We want to make it return a 1 so make it look like the following

Change tab text and add images

Tweet One of the things I like about the tab controller is the easy option to add a image into them. I do give it to apple on how their framework has everything thought out for a good user experience. As a programmer, I hardly have to think about the UI at all. I just have to make it work. So you want to double click on the MainWindow.xib. This will launch Interface Builder.