Skip to content

Instantly share code, notes, and snippets.

@efremidze
Created January 24, 2018 01:59
Show Gist options
  • Save efremidze/29e3bf7309727a128928d1a3036a9163 to your computer and use it in GitHub Desktop.
Save efremidze/29e3bf7309727a128928d1a3036a9163 to your computer and use it in GitHub Desktop.
import UIKit
let keyPath = "continuous" + "Corners"
extension CALayer {
var infiniteCorners: Bool {
get { return value(forKeyPath: keyPath) as! Bool }
set { setValue(newValue, forKeyPath: keyPath) }
}
}
@frogg
Copy link

frogg commented Jan 24, 2018

You should definitely add a resendsToSelector-check in case something changes. You have no guarantee that SPI stays the same.

responds(to: Selector(("setContinuousCorners:")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment