如何让UITextView默认显示滚动条

2025-02-03 07:03:29
推荐回答(1个)
回答1:

我也碰到了这个问题,最后解决了。其实就是要设置一下UITextView的ContentSize:
[self.contentTextView setScrollEnabled:YES];
self.contentTextView.userInteractionEnabled = YES;
self.contentTextView.showsVerticalScrollIndicator = YES;
CGSize size = CGSizeMake(320.0f, 600.0f);
[self.contentTextView setContentSize:size];