回覆列表
  • 1 # Tiekt鐵鐵

    1. 設定UITextView圓角問題做法是在#import QuartzCore/QuartzCore.h 後,便能呼叫[textView.layer setCornerRadius:10]; 來把UITextView 設定圓角2. UITextView根據文字大小自適應高度透過實現文字字數來確定高度,如下:NSString * desc = @"Description it is a test font, and don"t become angry for which i use to do here.Now here is a very nice party from american or not!"; CGSize size = [desc sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake(240, 2000) lineBreakMode:UILineBreakModeWordWrap]; 只有UILabel需要定義的numberoflines為0,即不做行數的限制。如下:[label setNumberOfLines:0]; [label setFrame:CGRectMake(40, 135, 240, size.height+10)]; [label setText:desc];

  • 中秋節和大豐收的關聯?
  • 玫瑰花,茉莉花,太陽花,哪一朵花最沒力氣?