Refresh Control Changes in iOS 10

Apple first added the pull-to-refresh style user interface control way back in iOS 6. Unfortunately it only worked with a table view controller. You were out of luck if you wanted to use it with a plain scroll view or collection views. After a long wait Apple enthusiastically announced at WWDC 2016 that iOS 10 was bringing refresh controls to the scroll view and by inheritance to table and collection views. This post walks you through what you need to know.

Read On →

Fun With Date Calculations

Date calculations are a common trap for the unwary. How do you work out the start of the day today, tomorrow or in five days or five months time? What is the correct answer when you add a month to January 31? If you are doing date and time calculations by adding the number of seconds in an hour or day you are probably doing it wrong.

Read On →

Adding Hardware Keyboard Shortcuts

I have been enjoying Matt Gemmell’s writing about going iPad only. A few weeks back he tweeted a request to iOS devs to support keyboard shortcuts. I vaguely remembered Apple adding the feature a few years back but I will confess I had no idea how to do it.

The good news is that it is not so difficult. A quick search of the Apple docs led me to UIKeyCommand introduced with iOS 7 and improved with iOS 9. So here is my guide to the basics you need to add hardware keyboard shortcuts.

Read On →

Completion Handlers as an Alternative to Delegation

The delegation design pattern is a familiar pattern to Cocoa programmers but there are times when it seems cumbersome to create and use. In this post I look at completion handlers as an alternative to delegation. At first glance they are simpler but come with some caveats.

Read On →

Local Notifications with iOS 10

I can’t believe it is over six years since I first wrote about local notifications in iOS 4. Well in iOS 10 Apple has deprecated UILocalNotification which means it is time to get familiar with a new notifications framework.

Read On →
Archives Categories
No time to watch WWDC videos?

Sign up to get my iOS posts direct to your inbox and I will send you a free PDF of my iOS Size Classes Cheat Sheet.

Unsubscribe at any time.