Skip to content

View in Code Objective C 0

Azmal Tech edited this page Dec 27, 2016 · 1 revision
  1. UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,480)];

  2. UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

  3. [label setFont:[UIFont boldSystemFontOfSize:18]];

  4. [label setTextAlignment:UITextAlignmentCenter];

  5. [label setBackgroundColor:[UIColor clearColor]];

  6. [label setTextColor:[UIColor whiteColor]];

  7. [label setText:@"Hello"];

  8. [view addSubview:label];

  9. [window addSubview:view];

Clone this wiki locally