UITextView
extension UITextView
取消对UITextView的观察无法在扩展中进行,需要在业务中进行处理 在iOS 9 (and OS X 10.11)之后,除了调用block-based api的需要手动调用removeObserver,其他不用再手动调用
-
占位符
Declaration
Swift
public var placeholder: String { get set }
-
占位符字体
Declaration
Swift
public var placeholdFont: UIFont { get set }
-
占位符字体颜色
Declaration
Swift
public var placeholdColor: UIColor { get set }
-
限制字数长度
Declaration
Swift
public var limitLength: Int { get set }
-
限制字数Label字体
Declaration
Swift
public var limitLabelFont: UIFont { get set }
-
限制字数Label字体颜色
Declaration
Swift
public var limitLabelColor: UIColor { get set }
-
限制的行数,优先级比限制字数低
Declaration
Swift
public var limitLines: Int { get set }
-
移除观察 如果不移除,在iOS11以下会因为没有移除观察引起crash
Declaration
Swift
public func removeObserver()
-
Undocumented
Declaration
Swift
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)