我正在嘗試創建一個具有動態可調節行間距的UITextView。對於iOS 6,我使用styleString調整間距,但是因爲該解決方案並不適用於iOS 7的工作,我設置的layoutManager委託並使用在UITextView iOS 7上減少行距
- (CGFloat)layoutManager:(NSLayoutManager *)layoutManager lineSpacingAfterGlyphAtIndex:(NSUInteger)glyphIndex withProposedLineFragmentRect:(CGRect)rect
return textView.lineHeight;
}
這對於增加行距的偉大工程,但不允許我來減少間距不是像默認間距下:
有沒有辦法用的layoutManager或任何其他解決方案降低對iOS的7行間距?
你有解決方案嗎? –
我一直在尋找,但沒有到目前爲止。 – Efesus