Example updated for Xcode 5 and iOS7