Here’s the answer, it’s a combination of my answer and Krishnan’s.
cabasicanimation.fillMode = kCAFillModeForwards;
cabasicanimation.removedOnCompletion = NO;
The default value is kCAFillModeRemoved
. (Which is the reset behavior you’re seeing.)
More Related Contents:
- iOS animate/morph shape from circle to square
- Determine device (iPhone, iPod Touch) with iOS
- Proper way to exit iPhone application?
- Setting action for back button in navigation controller
- Reading ePub format
- iPad keyboard will not dismiss if modal ViewController presentation style is UIModalPresentationFormSheet
- Handling applicationDidBecomeActive – “How can a view controller respond to the app becoming Active?”
- Remove or uninstall library previously added : cocoapods
- How do I make UILabel display outlined text?
- Detect current device with UI_USER_INTERFACE_IDIOM() in Swift
- How do you create a Swift Date object?
- ViewDidAppear is not called when opening app from background
- iOS memory allocation – how much memory can be used in an application? [duplicate]
- UIGestureRecognizer and UITableViewCell issue
- Remove SeparatorInset on iOS 8 UITableView for Xcode 6 iPhone Simulator
- How to use presentModalViewController to create a transparent view
- Get current URL of UIWebView
- What is a “delegate” in Objective C’s iPhone development? [duplicate]
- When to use takeUnretainedValue() or takeRetainedValue() to retrieve Unmanaged Objects in Swift?
- Is there a way to test my Xcode 7.2-compiled app with iOS 9.3?
- iPhone – Convert CTFont to UIFont?
- How to detect iphone is on silent mode
- Instead of push segue how to replace view controller (or remove from navigation stack)?
- How to specify size for iPhone 6/7 customised edge-to-edge image?
- How to draw radial gradients in a CALayer?
- Swift – Downloading video with downloadTaskWithURL
- Navigation bar show/hide
- How to remove border of the navigationBar in swift?
- How to use NSUnderlineStyle.PatternDot
- Core Bluetooth advertise and scan in the background