<span style= "color: #663366;" > Direct call method is possible </span>
<span style= "color: #663366;" ></span>
<span style= "color: #663366;" >//on which label to add the string line spacing size </span>
<p style= "margin-top:0px; margin-bottom:0px; font-size:13px; Font-family:menlo; " ><span style= "Color:rgb (255, 255, 255); >[</span><span style= "Color:rgb (222, 56, 166); >self</span><span style= "Color:rgb (255, 255, 255); > </span><span style= "color: #08fa95;" >setlabel</span><span style= "color: #330033;" >:</span><span style= "Color:rgb (222, 56, 166); >self</span><span style= "color: #330033;" >.</span><span style= "color: #08fa95;" >advert</span><span style= "Color:rgb (255, 255, 255); > </span><span style= "color: #08fa95;" >string</span><span style= "Color:rgb (255, 255, 255); >:</span><span style= "color: #330033;" >coach.</span><span style= "color: #08fa95;" >jladvert</span><span style= "Color:rgb (255, 255, 255); > </span><span style= "color: #08fa95;" >withlinespacing</span><span style= "color: #330033;" >:</spAn><span style= "Color:rgb (139, 135, 255); >2</span><span style= "Color:rgb (255, 255, 255); >];</span></p><span style= "color: #663366;" ></span>
<span style= "color: #663366;" ></span>
<span style= "color: #663366;" ></span>
<span style= "color: #663366;" > #pragma mark-line spacing-(void) SetLabel: (UILabel *) Label string: (NSString *) str withlinespacing: (cgfloat) space{Nsmut Ableattributedstring * mas=[[nsmutableattributedstring Alloc]init]; Nsmutableparagraphstyle * Style=[nsmutableparagraphstyle new]; Style.alignment=nstextalignmentleft; Style.linespacing=space; Style.linebreakmode = uilinebreakmodetailtruncation; Style.paragraphspacing=space; Nsdictionary * [email protected]{Nsfontattributename:[uifont systemfontofsize:13] , <span style= "white-space:pre" ></span>//label.text font size Nsforegroundcoloratt Ributename:[uicolor blackcolor],<span style= "white-space:pre" ></span>//label.textcolor font Color Nsparagraphstyleattributename:style}; Nsattributedstring *as=[[nsattributedstring alloc]initwithstring:STR Attributes:attributesdict]; [Mas Appendattributedstring:as]; [Label Setattributedtext:mas];} </span>
UILabel line Spacing method can be called directly