【iOS】UILabel


UILabel

  • 初始化
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
  • 指定顯示內容
    [label setText:@"Default Gamepad"];
  • 字體指定與大小指定
    [label setFont:[UIFont fontWithName:@"Arial-BoldMT" size:17]];
  • 字體顏色
    [label setTextColor:[UIColor lightTextColor]];
  • 字體背景顏色
    [label setBackgroundColor:[UIColor clearColor]];
  • 排版設定
    [label setTextAlignment:UITextAlignmentCenter];
  • Alpha值
    [label setAlpha:0.9f];
 

Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com