要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install
。
var textView: APExpandingTextView = APExpandingTextView(frame: ...)
textView._delegate = self
self.view.addSubview(textView)
...
// APExpandingTextViewDelegate
func textViewWillExpand(textView: APExpandingTextView!) {
...
}
func textViewDidExpand(textView: APExpandingTextView!) {
...
}
APExpandingTextView *textView = [[APExpandingTextView alloc] initWithFrame: ...];
textView._delegate = self
[self.view addSubView:textView];
...
// APExpandingTextViewDelegate
- (void)textViewWillExpand(textView: APExpandingTextView) {
...
}
- (void)textViewDidExpand(textView: APExpandingTextView) {
...
}
APExpandingTextView 通过 CocoaPods 提供。要安装它,请简单地将以下行添加到您的 Podfile 中
pod "APExpandingTextView"
Aadesh Patel, [email protected]
APExpandingTextView 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。