UIView

作者: 艾克12138 | 来源:发表于2016-06-25 20:58 被阅读39次

//UIview给大小

UIView *redview = [[UIView alloc]initWithFrame:CGRectMake(20, 20, 100, 100)];

//   给颜色 

redview.backgroundColor = [UIColor redColor];

//  tag值(用来标记控件)

  redview.tag = 10002;

//   添加到view上

 [self.window addSubview:redview];

//控制子视图

(1)[self.window bringSubviewToFront: aview];

(2)[self.window sendSubviewToBack:bview];

(3)[self.window insertSubview:greenview atIndex:0];

相关文章

网友评论

      本文标题:UIView

      本文链接:https://www.haomeiwen.com/subject/mtradttx.html