Objective-C Literals

Objective-C Literals

A "literal" refers to any value which can be written out directly in source code. For example, "hello" is a character literal and 32 is a integer literal. In the past Objective-C hasn't had support for defining literals, but as of Xcode 4.5 this is supported. The new syntax is also backwards compatible with older versions of iOS. Let's look at some NSNumber Objects.

Read More

Objective-C Style Guide

Objective-C Style Guide

n the past releases of Xcode, the current version is now Xcode 4.5, Apple made some subtle changes to Objective-C. If you google for some tutorials, you'll see old code all over the place. The purpose of this article is to review some of the changes over the years in Objective-C. Some of this changes will make your code look cleaner and thus simpler. As an example, look at the following block of code. We'll change this code along the way, as we review the changes in Objective.c The header file will look like this.

Read More

Version Control with Xcode

Version Control with Xcode

What is version control, and why should you care? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. If you are a developer and want to keep every version of your source code a Version Control System  is a very wise thing to use. It allows you to add features to your app without disturbing the original source code. It also allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time and much else.

Read More

Hello World Application

Hello World Application

Let's start our first project. What is a better way to start than the all-time classic Hello World application. First Create a new project with the Single View Application template. In the project settings dialog enter project name HelloWorld and Class Prefix Helloworld.

In this application, the storyboard file is named MainStoryboard.storyboard. When the app starts, the MainStoryboard.storyboard file is loaded and the initial view controller is instantiated from it.

Read More