Large Text Being Cut Off in UITextView That is Inside UIScrollView

后端 未结 17 1633
挽巷
挽巷 2020-11-29 02:03

I\'m having a serious problem that I just can\'t seem to fix and it\'s driving me insane for the last two days. I have searched far and wide and I can\'t find a solution, e

相关标签:
17条回答
  • 2020-11-29 03:02

    Try this

    [self.textView setContentInset:UIEdgeInsetsMake(-8.0, 0, -8.0, 0)];
    

    It work for the cut off text display in the UITextView.

    0 讨论(0)
  • 2020-11-29 03:03

    Just try this.

    In IOS 8 and Xcode 6.3,

    textview.scrollEnabled=YES;
    [self.textview setContentInset:UIEdgeInsetsMake(-10.0, 0, -5.0, 0)];
    
    0 讨论(0)
  • 2020-11-29 03:03

    I have the same Problem for a textview (without a scrollview). Solved this (Xcode 7.3.1, iOS 9.3) just by unchecking "Scrolling Enabled" in the Attributes Inspector.

    0 讨论(0)
  • 2020-11-29 03:04

    I may be wrong but I do not understand your problem thoroughly but what is the use of using a UIScrollView since with the UITextView class implements the behavior for a scrollable, multiline text region ?

    You should discard the UIScrollView.

    0 讨论(0)
  • 2020-11-29 03:04

    In Swift I fixed this issue by simply setting the textContainerInset of my UITextView:

    textView.textContainerInset = UIEdgeInsets(top: 0.0, left: 0.0,
                                               bottom: 50.0, right: 0.0)
    
    0 讨论(0)
提交回复
热议问题