2023年7月14日发(作者:)
UITextView⾼度⾃适应- (void)awakeFromNib { [super awakeFromNib]; // Initialization code ionStyle=UITableViewCellSelectionStyleNone; oundColor=LineColor; te=self; Width=2*PIX; Color=[UIColor lightGrayColor].CGColor; oBounds=YES; Radius=5; =[UIFont systemFontOfSize:14]; //加下⾯⼀句话的⽬的是,是为了调整光标的位置,让光标出现在UITextView的正中间 ntainerInset = UIEdgeInsetsMake(10, 5, 10, 5); DLog(@"1---->%f",);}//实现textViewDidChange⽅法:-(void)textViewDidChange:(UITextView *)textView{ if (>0) { =YES; }else{ =NO; } static CGFloat maxHeight =100.0f; static CGFloat minHeight =38.0f; CGRect frame = ; CGSize constraintSize = CGSizeMake(, MAXFLOAT); CGSize size = [textView sizeThatFits:constraintSize]; // if (<=) { if (
}
发布者:admin,转转请注明出处:http://www.yc00.com/web/1689265724a226479.html
评论列表(0条)