UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
[label setBackgroundColor:[UIColor redColor]];
[self.view addSubview:label];
UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(20,20, 100, 64);
[button setBackgroundColor:[UIColor greenColor]];
[label addSubview:button];
[label bringSubviewToFront:button];
平面显示
实际