Which modern Objective-C feature can you use where? Check the Objective-C Feature Availability Index (via 0xced).
Author: Steve
You don’t have to have 16:9 on day 1
You don’t have to build with armv7s right away. And despite user demands, you also don’t have to support 16:9 right away either. It’s fine to get real hardware into your hands. More than fine; it’s being responsible. Apple has you covered with letter boxing; let the 16:9 screen be their problem until you’re really… Continue reading You don’t have to have 16:9 on day 1
Do not release ARMv7s code until you have tested it
Apple defaults your projects to including ARMv7s code. But unless you can test it, turn it off. There’s nothing wrong with shipping ARMv7 code for a little while longer.
ADC incidents
In the past, I’ve tried to avoid using ADC incidents. You get two a year per program, and most years I’ve avoided using any. This year, I decided to use them both the iOS ones up before renewing.
Don’t write viewDidUnload
A lot of people misunderstand the point of viewDidUnload. That’s because despite the name that implies otherwise, it is not the counterpart of viewDidLoad.
Modern Objective-C with iOS 5
Modern Objective-C contains subscripting support. Instead of writing: NSString *value = [dict objectForKey: @"Key"]; You can now write: NSString *value = dict[@"Key"]; Unfortunately, this requires SDK support. While the OS X SDK provides this support, the iOS 5 SDK one doesn’t. I’m going to show you how to add it.
Restart Xcode now
If you’re a heavy user of Xcode, you’ve probably had it go sideways on you. Thankfully, the crashes that plagued previous versions are mostly gone. But in its place are some awkward debugger connection failures, long delays and such. Here’s how I created a shortcut key to relaunch Xcode. You may find Programmer’s KillSwitch more… Continue reading Restart Xcode now
Keyboard type is not a validator
So you’ve set your UITextField’s keyboardType to only accept numbers. Or email addresses, or URLs, or whatever. Fine. You’re done, right? What are you going to do if they enter something else in there? UITextField’s keyboard type is a keyboard type, not a validator.
Make a symbolic link from Finder
In a previous entry, I explained How to Sync Xcode’s Settings via Dropbox. This involves creating symlinks in Terminal, and cleverly moving files about. You can’t create symlinks in Finder with what Apple provides you, but you can create an Automator workflow to do so easily.
How to sync Xcode 4’s key bindings and code snippets
You can use Dropbox to synchronize Xcode 4’s key bindings, code snippets, named tabs, and font & color schemes. If you don’t have a Dropbox account yet, you can sign up here. The secret is symlinks. These are different from the aliases you can create in Finder, so you’ll need to do this in the… Continue reading How to sync Xcode 4’s key bindings and code snippets