中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

iOS標(biāo)簽

標(biāo)簽的使用

標(biāo)簽用于顯示靜態(tài)內(nèi)容,包括單獨(dú)的一行或多行。

重要的屬性

  • textAlignment
  • textColor
  • text
  • numberOflines
  • lineBreakMode

添加自定義方法?addLabel

-(void)addLabel{
    UILabel *aLabel = [[UILabel alloc]initWithFrame:
    CGRectMake(20, 200, 280, 80)];
    aLabel.numberOfLines = 0;
    aLabel.textColor = [UIColor blueColor];
    aLabel.backgroundColor = [UIColor clearColor];
    aLabel.textAlignment = UITextAlignmentCenter;
    aLabel.text = @"This is a sample textn of multiple lines.
    here number of lines is not limited.";
    [self.view addSubview:aLabel];
}

在?ViewController.m?中更新?viewDidLoad,如下所示:

- (void)viewDidLoad
{
    [super viewDidLoad];
    //The custom method to create our label is called
    [self addLabel];
    // Do any additional setup after loading the view, typically from a nib.
}

輸出

運(yùn)行應(yīng)用程序,就會得到下面的輸出:

labelOutput

其他擴(kuò)展