UITextView 代表禁用滚动

Posted

技术标签:

【中文标题】UITextView 代表禁用滚动【英文标题】:UITextView delegates disables Scrolling 【发布时间】:2016-07-09 14:59:43 【问题描述】:

设置 UITextView 的委托时,我无法滚动,添加新行时,滚动视图不会向下滚动

UITextView 在 UITableView 内的 UITableViewCell 内

我的代码是

class groupProfile_DescriptionCell: UITableViewCell, UITextViewDelegate     

@IBOutlet weak var tvEdit: UITextView!

override func initCell() 
    ...
    tvEdit.scrollEnabled = true
    tvEdit.delegate = self

【问题讨论】:

【参考方案1】:

经过一些尝试和错误后,我发现将UIScrollViewDelegatescrollViewDidScroll 函数添加到我的班级可以解决我的问题。希望它可以帮助其他遇到此问题的人

【讨论】:

以上是关于UITextView 代表禁用滚动的主要内容,如果未能解决你的问题,请参考以下文章