How to adjust a UITextView to not clip the top row?

Viewed 42

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?

1 Answers
let attributes = [
NSParagraphStyleAttributeName: paragraph,
NSFontAttributeName: font,
NSBaselineOffsetAttributeName: -5

]

I think you should write these lines to bound.

Related