Is there a way to put UITextView's scroll indicator to outside UITextView?

前端 未结 3 443
花落未央
花落未央 2021-01-04 22:51

It might be a silly question. I\'m trying to set left/right margins like the attached picture. I succeeded to implement it by adding UITextView to UIScrollView. However, I c

相关标签:
3条回答
  • 2021-01-04 23:13

    You can set the scroller right inset value of the UITextView to negative value and disable the clip subview option to achieve your require. No other scrollview is needed. alt text

    0 讨论(0)
  • 2021-01-04 23:15

    Alternatively you could set the Right contentInset property.

    0 讨论(0)
  • 2021-01-04 23:28
    UIEdgeInsets insets =  textView.scrollIndicatorInsets;
    insets.right += 5; //add what ever is your margain
    textView.scrollIndicatorInsets = insets;
    
    0 讨论(0)
提交回复
热议问题