CAAnimationDelegate is a new protocol that has been added to the iOS 10 SDK. This means that it exists if you create with Xcode 8, but not there if you create with Xcode 7.
When you create with Xcode 8, you will get a warning:
Assigning to 'id<CAAnimationDelegate> _Nullable' from incompatible type 'WhateverUIViewController *const __strong'
If you add CAAnimationDelegate, your code will no longer be created in Xcode 7. If you need to build using both Xcode, you need to use ifdefs:
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 100000 // CAAnimationDelegate is not available before iOS 10 SDK @interface WhateverUIViewController () #else @interface WhateverUIViewController () <CAAnimationDelegate> #endif
source share