Blog

Tag Archives: iPhone

Easy Delayed Messaging using NSProxy and NSInvocation

Sometimes it’s necessary to perform an action some time in the future, whether it’s disabling a button for a certain time interval after it’s pressed, performing an animation after a short wait, or triggering a reload of some data. NSTimer is great for that purpose, as well as repeatedly performing actions, but it’s most convenient [...]
Also tagged , , | Leave a comment

Playing audio in time using Remote IO

I got an email today with a question about how to handle playback of audio in time, synchronised with a clock. My ‘musical notepad’ app Loopy does this, and I thought I’d briefly explain how. Any app that makes use of the Remote IO audio unit framework (which is generally necessary for the kind of [...]
Also tagged , , , | Leave a comment

iPhone debugging tip: Breaking on exceptions and reading their content

Just a quick one: This may be obvious to many devs, but it’s worth noting. One common and useful debugging technique is breaking on exceptions, so that you can see exactly where in your app’s flow a breakpoint occurs. This can be done by adding -[NSException raise] and objc_exception_throw to your breakpoints list. Once an [...]
Also tagged , , , | Leave a comment

A trick for capturing all touch input for the duration of a touch

If you’ve ever tried to implement an interactive control that makes use of gestures within a UITableView, or tried to implement a view that you can drag around, like pins on a MKMapView, you’ll know that you’re either generally thwarted by the scroll view (and the table view will just scroll, instead of your control [...]
Also tagged , , | Leave a comment

iPhone/Mac animation for custom classes: Property animation for more than just CALayer

An Objective-C class that provides similar functionality to CABasicAnimation, but works on any object.

Also tagged , , , , , | Leave a comment

Links for May 30th through August 8th

Links for May 30th through August 8th: cufón – fonts for the people A very impressive framework that embeds any font into a website, via javascript and the canvas element. Great cross-browser support. mikeash.com: Method Replacement for Fun and Profit Method replacement and method swizzling in Objective-C. Core Data Tutorial: How To Use NSFetchedResultsController | [...]
Also tagged , , , , , , , | Leave a comment

Achieve smaller app downloads by replacing large PNGs with JPEG + mask

I’m using a transparent overlay on top of a fairly common interface element to make it look awesome. I originally did this with a transparent PNG, until I realised the PNG in question for the iPhone 4′s Retina display was truly massive, clocking in at 1 Mb. Why we don’t have common image format with [...]
Also tagged , , , | Leave a comment

Making UIToolbar and UINavigationBar’s background totally transparent

Technique to make the background of UIToolbar and UINavigationBar transparent, for custom interfaces

Also tagged , , | 1 Comment