模态视图中添加代码的具体方法
来源:互联网 发布:js canvas 动画库 编辑:程序博客网 时间:2024/06/04 00:18
-(void)redifineView:(UIView *)changeView{
if (changeView !=nil) {
for(UIView *view in [changeView subviews])
{
[view removeFromSuperview];
}
UILabel *myLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(changeView.bounds),30)];
myLabel.text=@"Hello Label";
myLabel.backgroundColor=[UIColor redColor];
[self.popupView addSubview:myLabel];
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(0, 30, CGRectGetWidth(changeView.bounds),20)];
button.titleLabel.text=@"Button";
button.backgroundColor=[UIColor blueColor];
[self.popupView addSubview:button];
}
}
if (changeView !=nil) {
for(UIView *view in [changeView subviews])
{
[view removeFromSuperview];
}
UILabel *myLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(changeView.bounds),30)];
myLabel.text=@"Hello Label";
myLabel.backgroundColor=[UIColor redColor];
[self.popupView addSubview:myLabel];
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(0, 30, CGRectGetWidth(changeView.bounds),20)];
button.titleLabel.text=@"Button";
button.backgroundColor=[UIColor blueColor];
[self.popupView addSubview:button];
}
}
0 0
- 模态视图中添加代码的具体方法
- 动态添加修改WEB.CONFIG的具体代码方法
- iOS 用代码添加模态视图
- iOS用代码在视图中动态添加多个有序排列UIView的方法(例如九宫格)
- 在(CListView)列表视图中添加右键菜单的方法
- IPhone中给窗口和视图添加背景的方法
- Android添加开机音乐的具体方法
- UIView添加背景图片的具体方法
- 在Android代码中动态添加视图
- DDMenu中添加手势是否有用的方法,为了在视图中添加手势起作用
- 对话框中添加视图方法- CScrollView
- Qemu中生成针对具体体系结构的纯净代码的方法---利用GCC的-E选项
- Qemu中生成针对具体体系结构的纯净代码的方法---利用GCC的-E选项
- navigationItem 添加标题视图的方法
- UIToolBar 添加任意的视图 方法
- 谈谈UICollectionView添加头视图的方法
- PowerDesigner导出SQL添加视图的方法
- oc中类的具体实现方法
- 黑马程序员——关键字、标示符、注释
- 使用ratingbar评分的星星
- 并口定义及并口编程基础
- Android 使用android-support-multidex解决Dex超出方法数的限制问题,让你的应用不再爆棚
- sqlserver2008 服务 连接失败 -服务器名称如何写!!
- 模态视图中添加代码的具体方法
- JAVA生成Word文档(经过测试)
- js正则截取替换特定字符之间的字符串
- 百度地图经纬度 转换到 腾讯地图/Google地图 对应经纬度
- 用矩形法求定积分,分别求sin x dx ,cos x dx,e exp x;
- 出现的问题: A、使用命令行无法登录oracle或者显示ORA-01109:数据库未打开; B、使用PL/SQL登录出现 ORA-01033:ORACLE initialization or
- td对象的成员
- Mahout构建图书推荐系统【一起学Mahout】
- Samba服务器(一):windows访问samba服务器共享文件的简单实现(图文并茂)