无法为scrollView swift iOS

时间:2019-01-03 09:25:10

标签: ios swift uiscrollview textview

My <code>TextView</code> is inside the <code>scrollView</code> and I've disabled the scroll for <code>textView</code>. But My <code>textView</code> doesn't get the full content for some reason and the scroll doesn't happen

我的TextViewscrollView内部,并且我已禁用textView的滚动。但是由于某种原因,我的textView无法获得全部内容,并且滚动不会发生。

我已经将textView的高度等同于最上方的视图。 textView的宽度等于scrollView的宽度。 我也将这段代码添加到了ViewDidLoad()中:-

messageTextView.setTheme(.noTheme)
messageTextView.delegate = self
//messageTextView.textContainerInset = UIEdgeInsets.zero
messageTextView.textContainerInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)
messageTextView.textContainer.lineFragmentPadding = 0
messageTextView.isScrollEnabled = false
messageTextView.attributedText = attributedMessageWithLink()

0 个答案:

没有答案