//Row height #define KLINESPACE 1.5 Self . Memo. Text = self. Ticketmodel. Memo; //Set Font sizeSelf . Memo. Font = kfontsize(N); //Calculate font size cgsize memosize = [self..sizewithfont: kfontsize 12maxsize :cgsizemake (260 Maxfloat //Calculate the height of the text after adding line height cgfloat Linesh = (memosize. Height / 1) * klinespace; //Establish Text properties
nsmutableattributedstring *attributedstring = [[ nsmutableattributedstringalloc] initwithstring: Self.. nsmutableparagraphstyle *paragraphstyle = [[nsmutableparagraphstylealloc] init]; // adjust line spacing [ Paragraphstyle :klinespace [ attributedstring :nsparagraphstyleattributenamevalue: Paragraphstyle :nsmakerange0 self.< Span style= "FONT-FAMILY:MENLO;" >memo.length Self . Memo. Width = memosize. width; Self . Memo. Height = Linesh; //Set Text propertiesSelf.Memo.Attributedtext= attributedstring;
[self. Memo sizetofit";
self.topview. = cgrectgetmaxy (self. Memo.10 self. Myscrollview.cgsizemake (self. View.self topview. Height + 10
iOS settings Uilabel line spacing