loadview

- (void)loadView

{

    UIView *contentView = [[UIViewalloc] initWithFrame:[[UIScreenmainScreen] applicationFrame]];

    contentView.backgroundColor = [UIColorlightGrayColor];

    

    UILabel *label = [[UILabelalloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 30.0f)];

    label.text = @"Hello,World";

    label.center = contentView.center;

    label.textAlignment = UITextAlignmentCenter;

    label.backgroundColor = [UIColorclearColor];

    

    [contentView addSubview:label];

    

    self.view = contentView;

}

你可能感兴趣的:(view)