0
在NSMutableParagraphStyle段落間距工作得很好。在NSMutableParagraphStyle中的多段落間距
但我使用項目符號也。
當用戶按返回(回車)然後新的段落會來。
所以當用戶類型要點在的UITextView然後在兩點paragaph間距之間應該是小,並在所有的段落間距的其餘部分是東西高。
我的代碼...
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.minimumLineHeight = 0.f;
paragraphStyle.maximumLineHeight = 16.f;
paragraphStyle.firstLineHeadIndent = 16.0;
paragraphStyle.paragraphSpacing = 7.0;
paragraphStyle.lineSpacing = 5.0;
paragraphStyle.headIndent = 16.0;
paragraphStyle.lineBreakMode=NSLineBreakByWordWrapping;
paragraphStyle.tailIndent=305.0;
mutattstr1 = [[NSMutableAttributedString alloc] initWithAttributedString:txtViewOfNotes.attributedText];
[mutattstr1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, mutattstr1.length)];
[txtViewOfNotes setAttributedText:mutattstr1];
如在此文本視圖我需要給小空間中的要點線之間徘徊。
那麼,如何讓多個行距或段落間距或應用程序與此相關的任何其他事情。
任何一種聯繫,想法,代碼,船塢歡迎...
ya這是真的,但是當用戶鍵入一個段落,並且如果新段落將帶有圓點(意味着從左側有更多空間),那麼它會波動,並且在刪除文本時,文本也會波動。如果你解決這個問題,那麼問題就沒有了 – Sam