NSString *text=@"this is the test"; CGSize constraintSize; constraintSize.width = rect1.size.width; constraintSize.height = MAXFLOAT; CGSize sizeFrame =[text sizeWithFont: [UIFont systemFontOfSize:16] constrainedToSize:constraintSize lineBreakMode: UILineBreakModeWordWrap]; textview.text=text; [textView setFrame:CGRectMake(0, 0, 310, sizeFrame.height+40)];
UITextview的高度适应问题
最新推荐文章于 2018-07-18 23:16:11 发布