Aug 19

This article was originally posted here.

Sometimes, when writing an iPhone application that handles UITableViewCell selection, we need to let an object know what the index path of the selected cell was, and then have it give that information back to you later. An example of this is having a UIActionSheet appear when a certain cell is selected. UIActionSheet (without subclassing) does not allow you to save an NSIndexPath onto it, but it does allow the use of its tag property. Continue reading »

Tagged with:
 
Aug 02

This article was originally posted here.

On Stack Overflow there has been some interest in how to use the Delegate design pattern in Objective-C. Of course, the first step in any search should be to read Apple’s documentation, but many people seem not to want to read the whole thing. Trust me, folks, it is worth it. But Apple’s documentation on creating delegates doesn’t use protocols, which are such an amazing and useful part of the Objective-C language. Continue reading »

Tagged with:
Jul 29

xcode_logoThis will be a simple tutorial showing you how to access the iPhone’s photo library as well as the camera. Since the 3.0 update, the methods for picking photos have been deprecated. So this will be a 3.0 and above tutorial.
Continue reading »

Tagged with:
Jul 28

This article was originally posted here.

Cocos2d is an Objective-C framework for writing 2D games without much delving into pure C. This post assumes a basic understanding of the framework. One of the first problems you come up against in Cocos2d is handling touch events on your Sprite objects, and knowing which instance was touched. Continue reading »

Tagged with:
Jul 27

xcode_logoThis is part 4 of the Address Book Programming Guide for iPhone.  Here you can find part 3.
Continue reading »

Tagged with:
preload preload preload