update for ios 8.1 changes to Swift