iOS 14.5 Support
Closed this issue · 5 comments
markst commented
markst commented
My previous implementation checked for availability:
// iOS 14.1 -> _UITextFieldCanvasView
// iOS 15.0 -> _UITextLayoutCanvasView
if let klass = NSClassFromString("_UITextFieldCanvasView") as? UIView.Type {
hiddenView = klass.init()
hiddenView.layer.perform(Selector(("setDisableUpdateMask:")), with: 0x12)
} else {
let textField = UITextField()
textField.isSecureTextEntry = true
hiddenView = textField.layer.sublayers?.first?.delegate as! UIView
hiddenView.subviews.forEach { $0.removeFromSuperview() }
}
markst commented