'How to adjust a UITextView to not clip the top row?
UITextViews can be scrolled by user gestures so that some rows of text might be only partially visible.
Is it possible to adjust the positioning of text in a UITextView so that the top visible row of characters is not clipped (ie partially obscured above the top of the view rectangle)? Perhaps by smoothly scrolling up or down by a fraction of a line height some time after user interaction has ended? If so, how?
Solution 1:[1]
let attributes = [
NSParagraphStyleAttributeName: paragraph,
NSFontAttributeName: font,
NSBaselineOffsetAttributeName: -5
]
I think you should write these lines to bound.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Muhammad Hassan |
