ios - Unable to show all content of UILabel -
i have uilabel default showing 3 lines of text. want display text content in cases. have tried found, nothing works. here latest try:
cgrect labelsize = [contents.contentlanguage.description boundingrectwithsize:cgsizemake(self.view.frame.size.width * 0.97, cgfloat_max) options:nsstringdrawinguseslinefragmentorigin attributes:@{nsfontattributename:[uifont systemfontofsize:15]} context:nil]; cell.desclbl.frame = cgrectmake(labelsize.origin.x, labelsize.origin.y, ceil(labelsize.size.width), ceil(labelsize.size.height)); [cell.desclbl setnumberoflines:0]; [cell.desclbl setlinebreakmode:nslinebreakbywordwrapping]; [cell.desclbl sizetofit];
maybe should @ maybe using uitextview instead? it's better suited multiline text.
Comments
Post a Comment