UIView层次管理(sendSubviewToBack,bringSubviewToFront)
来源:互联网 发布:陪吃陪喝陪玩的软件 编辑:程序博客网 时间:2024/05/19 20:45
UILabel*lab =[[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 43)]; lab.numberOfLines = 0; lab.textAlignment = NSTextAlignmentCenter; lab.backgroundColor = [UIColor clearColor]; lab.text = @"测试文字"; UISegmentedControl*segment = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"测试UISegmentedControl"]]; segment.frame = CGRectMake(100, 100, 300, 43); segment.selectedSegmentIndex = 0; [self.view addSubview:segment]; [self.view addSubview:lab]; [self.view bringSubviewToFront:segment];
将某一个view放在最上面:
将一个UIView显示在最前面只需要调用其父视图的 bringSubviewToFront()方法。
将某一个view放在最下面:
将一个UIView层推送到背后只需要调用其父视图的 sendSubviewToBack()方法。
0 0
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- UIView层次切换(bringSubviewToFront,sendSubviewToBack)的使用
- iOS 视图层次管理 sendSubviewToBack、bringSubviewToFront
- iOS 视图层次管理 sendSubviewToBack、bringSubviewToFront
- ios工作札记2——UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- sendSubviewToBack,bringSubviewToFront
- BringSubviewToFront sendSubviewToBack 小结
- bringSubviewToFront/sendSubviewToBack/removeFromSuperview
- sendSubviewToBack和bringSubviewToFront
- bringSubviewToFront()和sendSubviewToBack()
- UIView层次管理
- MySQL取字符串中间
- 编辑器里面不出现的entity wmignore
- ANDROID内存优化(大汇总——上)
- curl 命令
- 154,UI之注意事项
- UIView层次管理(sendSubviewToBack,bringSubviewToFront)
- Mental Ray渲染--在摄像机动画中如何避免finalgather闪烁?
- UVa 11218 - KTV
- C.数据处理
- C语言冒泡排序法和函数stoi()数字字符串转化的问题
- friction就是走了会停下,必须一直按键才能一直走
- 通过TortoiseGit上传项目到GitHub
- NSDate,NSString,int 数据类型相互转换
- 在源Eclipse上安装Myeclipse插件