I've used property lineHeightMultiple for looking like no spacing between line.
if quoteFontType == .binggraeII || quoteFontType == .binggraeIIBold
{
paragraphStyle.lineHeightMultiple = 0.6
}
The reason of using lineHeightMultiple is
1) line spacing can not set negative
2) lineHeightMultiple is property that can effect to line height.
But I don't want to effect to text selection rect. When I selected text, selection rantangle rect is wrong position. It looks like over text area. When I comment that lineHeightMultiple code, it's located correct area (cover all text).
I tried this way to set caretRect. But it's working well only not selection status.
override func caretRect(for position: UITextPosition) -> CGRect {
var rect = super.caretRect(for: position)
rect.origin.y = SQGlobal.shared.topInsetLineHeightSmall != nil ? rect.origin.y - (SQGlobal.shared.topInsetLineHeightSmall!)/2 : rect.origin.y
return rect
}
So, I'd like to ask two question.
1) is it possible really close lines without lineHeightMultiple?
2) is it possible set selection cursor (caret) position??