iOS, Objective-C, Swift, Design and Whatever Comes in Mind

Swift 3: Struggle with CAKeyframeAnimation

In a few weeks, Apple will release Swift 3. With it come changes in many APIs. One of them is CAKeyframeAnimation. I am not overly delighted by the current situation and have to familiarize with many decisions. The current topic is one of them.
CAKeyframeAnimations keyTimes was changed from [AnyObject]! to [NSNumber]? which sounds god at first. Why would somebody complain about more type safety as the property gained exactness?

First, existing code must be adapted to this. When it was ok to pass in an array of [double] you now have to declare the variable as let keyTimes : [NSNumber]=.... In addition to that, the migrator wont help you in doing so. Your project won't build until you resolved any issues by hand.
Furthermore, it is not possible to perform math on NSNumbers. Therefore you cannot calculate any relative keyTimes without fighting against the type system and convert back and forth.

Properties like public var beginTime: CFTimeInterval { get set } on the other hand are of type CFTimeInterval which makes it easy to pass in a double.



In the end I just don't know what to do. Should I file a radar? Should I write to other people about it? Should I write my frustration down into a blogpost? I started with the latter.

"Swift 3: Struggle with CAKeyframeAnimation".

Design Exercise: Ocean Sunset

Last week was the worst week since... since I have weeks. Hopefully, that time is over now and brighter days are ahead.

"Design Exercise: Ocean Sunset".

WWDC 2016: Wow Moments

In the next days I will continue watching the session videos of this years WWDC.
My plan is to write about every 'wow that is cool' moment. This way I can remember those things more easily and maybe you find it helpful as well.

Let the videos begin 🍾

"WWDC 2016: Wow Moments".