Category Archives: Objective-C

Updating An sqlite CoreData Backing Store On iOS

Something that has unpleasantly surprised many an iOS developer is that to update the data in an sqlite database that is the backing store for CoreData you need to do more than just make a new release of your app … Continue reading

Posted in app, code, iOS, iPad, iPhone, Objective-C | Tagged , , , , , , , | 2 Comments

How To Combine Two Images In iOS

A question that has been asked a lot on my iOS Still Image Capture With AVCaptureSession post is how to combine the overlay image that is shown with the image that is being captured by the camera. The more general … Continue reading

Posted in app, AR, code, iOS, iPad, iPhone, Objective-C | Tagged , , , , , , | 32 Comments

The UDID Apocalypse and: How I Learned To Cut Back On NSUserDefaults And Love The Keychain

Edit: To be honest, I will still use NSUserDefaults for a lot of things, and you should too, I just liked the Doctor Strangelove reference. By now you have probably heard that Apple is deprecating support for attaining a UDID … Continue reading

Posted in app, code, iOS, iPad, iPhone, Objective-C | Tagged , , , , , | 4 Comments

How To Use The Front Facing Camera With AVCaptureSession

A number of people have asked how to use the front facing camera for the video preview layer of an AVCaptureSession. First I will give you the code to add/change in the existing AROverlayExample project or the AROverlayImageCaptureExample project and … Continue reading

Posted in app, AR, code, iOS, iPad, iPhone, Objective-C | Tagged , , , | 4 Comments

Capturing Touches On A View Inside A Scroll View

I recently needed to create a vertically scrolling UIScrollView with a child sub view on which I needed to capture touches. Working with this kind of layering of views and the responder chain can be tricky but it is not … Continue reading

Posted in app, code, iOS, iPad, iPhone, Objective-C | Tagged , , , , , , | 3 Comments

How To Split A Long NSString At Word Boundaries

I recently needed to split an NSString to fit in a certain width. Though you can accomplish this with a UILabel with line breaks set to word wrap and number of lines set to zero or more than one, I … Continue reading

Posted in code, iOS, iPad, iPhone, Objective-C | Tagged , , | 2 Comments

Best Online Resource For Novice iOS Programmers

These days the web is awash in blog posts and tutorials to help you get started programming for the iPhone, iPad and iPod Touch. Today I want to point out what I think is probably the best starting place for … Continue reading

Posted in code, iOS, iPad, iPhone, Objective-C | Leave a comment

Plug-And-Play OpenAL / AVFoundation Sound Engine For iPhone Apps

I recently found a great sound engine for iPhone applications that is pretty much plug-and-play. This sound engine was written by Alex Restrepo under a creative commons attribution-share alike licence, so you are free to use it so long as … Continue reading

Posted in code, iPhone, Objective-C, sound | 1 Comment

Xcode Script For Creating Properties From Instance Variables For UIViewController

One of my favourite blogs on the net is Matt Gallagher’sĀ Cocoa with Love. Today I was investigating ways to speed up my workflow in Xcode and I found a great mixed Perl and AppleScript script already written by Matt a … Continue reading

Posted in code, hack, iPhone, Objective-C, OSX, script, XCode | Leave a comment

When To Use self.myObject Instead Of myObject In iPhone Programming

I have seen a lot of confusion on the topic of when and why to reference an object using self.myObject versus just plain myObject. It took me a while to understand this myself, and please, if I am mistaken in … Continue reading

Posted in code, iPhone, Objective-C | 1 Comment