facebookarchive / Shimmer

An easy way to add a simple, shimmering effect to any view in an iOS app.
Other
9.35k stars 1.11k forks source link

Fix warnings due to API changes in iOS 10, Beta 2 #65

Closed natansh closed 8 years ago

natansh commented 8 years ago

iOS 10, Beta 2 introduced changes to CALayerDelegate and CAAnimationDelegate, both of which are now proper protocols instead of informal ones.

This can be seen in the API diffs.

This PR fixes the warnings by introducing a macro which compiles to those two delegate protocols when on the iOS 10 SDK but compiles to a placeholder protocol when using the iOS 9 SDK or below.

Fixes #63.

b3ll commented 8 years ago

I like @kastiglione's solution a bit more, seems cleaner :)

natansh commented 8 years ago

@b3ll I agree. It's cleaner to do it as @kastiglione suggested since it's needed in just one location.

kastiglione commented 8 years ago

@b3ll I'll leave the merge button all to you.

b3ll commented 8 years ago

💯