@IBInspectable var isTitleEnabled: Bool = true{
didSet{ setup() }
}
private func setup(){
textField.isSecureTextEntry = isPassword
}
guard textField != nil else { return }
textField.isSecureTextEntry = isPassword ? true : false
textfield?.isSecureTextEntry = isPassword ? true : false
。 - adamjansch查看答案,请访问@IBDesignable error: Failed to update auto layout status。
或者在您的Storyboard选择中尝试前往Editor→Refesh All Views。