Latest Articles

Use the navigation at the bottom to see older articles

How to localize your project in Xcode 4.4

Before we start we need to create a new file called Localizable.strings (from File – New – Resource – Strings File). Xcode needs one file per language. Next we create localized copies of our files: head over to your Project Editor (the big blue icon) select it again under Project (another blue icon) make sure […]

How to link to an iOS App

Direct web link to your app or developer account showing all your apps: http://itunes.com/apps/my-app-name http://itunes.com/apps/my-developer-name itms://itunes.com/apps/my-app-name (opens iTunes) itms://itunes.com/apps/my-developer-name (opens iTunes) itms-apps://itunes.com/apps/my-app-name (opens App Store) itms-apps://itunes.com/apps/my-developer-name (opens App Store) Direct link to a country specific app store (say Germany in this exampe): http://itunes.apple.com/de/app/my-app-name If your app name contains spaces replace them with dashes. Replace http […]

How to add version control to an existing project in Xcode

Setting up a local GIT repository: Open Terminal and change to the directory where your project is located (cd /path/to/your/project). Then use the following shell commands: git init git add . git commit -m “my initial commit (or any other comment you feel like)” NOTE: as of Mountain Lion you need to install the Xcode […]

How to style a table view header / footer

The UITableView implements a header and a footer when you’re using the tableView:titleForHeaderInSection method (tableView:titleForFooterInSection respectively). However when the header (or the footer) is displayed you can’t change the font or colour of your text. You can however implement the following methods in your table view delegate and create a custom UILabel object for the […]

How to add a background image to a table view

The easiest way to do this is by adding a UIImage to your table. Rather than instantiating a new table object you can simply add the following line into the first Table View Data Source method you have – such as this one: – (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { tableView.backgroundView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@”background.jpg”]]; // Return the […]

How to react to a UIAlertView

An alert view has the clickedButtonAtIndex property. The first clicked button is 0, the next one 1, and so forth. If you conform to the UIAlertViewDelegate protocol you can implement the following method and react to each pressed button accordingly, or…