Archive | Code Tips RSS feed for this section

How to Archive Your Object Graph

Your app’s object graph is the collection of objects that are active in your app when the app is running.  For iOS apps, this is the application object, the app delegate, window and all the custom objects that you’ve created. Usually, your application will have a sub-set of objects in your object graph that you [...]

Read full story Comments { 0 }

How to Asynchronously Add Web Content to UITableView in iOS

When your iOS app is downloading content from the web, you run the risk of completely locking up your user interface. This makes your app seem to “freeze” and users usually think that it’s broken. Even if it’s just waiting for a response from a web server. Ick! Let’s see how to do this better [...]

Read full story Comments { 3 }

Format Dates In Objective-C With NSDate + NSDateFormatter

Anyone who uses NSDate knows that the output format can be pretty unpleasant looking. This output is not something that you would generally present to your users. So what is an Objective-C programmer to do with dates? The answer is to use NSDateFormatter to create date formats and get data objects formatted as strings that [...]

Read full story Comments { 0 }

Comparing Strings With NSString In Objective-C

Many people, when they are first starting with Objective-C and iOS want to be able to compare strings in if-then statements and things like that. It seems natural to try to write something like: NSString *string1 = @”A”; NSString *string2 = @”B”; if(string1 == string2) //do something else //or not NOTE: ^ the code above [...]

Read full story Comments { 3 }

Add And Subtract Dates In Objective-C

Here is the problem: your app works with dates and you would like to be able to find out what day came a week before, or is coming up in two years.  There are a few ways to do this but the easiest by far is to use your user’s calendar along with the NSDateComponents [...]

Read full story Comments { 4 }

Compiling Mac Apps With ARC From Terminal

The other day, I was looking around for a simple way to just compile a text file for a simple Mac app.  This isn’t something that you would do everyday but there are times when it’s nice to have the simplest bit of code out there without all the fuss involved with the XCode templates [...]

Read full story Comments { 0 }

Introduction To Core Graphics For iOS Apps

We get a lot for free when we are composing apps for the iPhone and iPad.  Stunning graphics.   Flowing animations. But, there are times when you want to move list a little bit past the built in graphics and animations that iOS comes with.  You have some options to put your own little touch [...]

Read full story Comments { 0 }

Here Is Everything You Need To Know About Storyboards!

Storyboards are an fun new way to get your user interface up and running quick.  Here is my collection of how to use storyboard blog posts that I think you will find very helpful. XCode Storyboards In iOS 5 Here we go over the alternatives that you have when composing your UI so that you [...]

Read full story Comments { 1 }

Using Storyboards To Make Navigation Based iPhone Apps

Over the past few weeks I’ve been doing a series on using the new storyboard feature in XCode for iOS apps.  The short story here is that we can now compose our iOS apps in a completely new way when we are coding apps in iOS 5.  Storyboards are not backward compatible. Today, I’m going [...]

Read full story Comments { 14 }

Using Storyboards To Create A Single View Application

In my last post on Storyboards I talked in general about Storyboards with XCode and iOS. Now, it’s time for a nitty-gritty how to demonstration. How To Use Storyboards To Create An iOS App The simplest app that I can think of that would make use of iOS Storyboards is a single scene app that [...]

Read full story Comments { 6 }
Affiliate Policy Disclosure

Switch to our mobile site