HintTextView
iOS. UITextView 支持占位符
cocoapods
pod 'HintTextView'
使用示例
class ViewController: UIViewController {
@IBOutlet private weak var textView: HintTextView!
override func viewDidLoad() {
super.viewDidLoad()
textView.layer.borderColor = UIColor.black.cgColor
textView.layer.borderWidth = 1
textView.hint = "텍스트를 입력하여 주세요. 내가 하고 싶은 말을 다 적어봅시다."
}
}
使用 Storyboard
简单易用!
- 属性检查器