【ios 汇总 - UI 视图布局 】
2014-01-25 01:08
441 查看
iOS 各种控件默认高度(图示)
http://blog.csdn.net/tongzhitao/article/details/8569279UIButton上使用UIEdgeInsetsMaketitle 跟图片对齐
http://blog.csdn.net/yanxiaoqing/article/details/7230660contentSize、contentInset和contentOffset区别
http://blog.csdn.net/kylinbl/article/details/7043936UIView层次管理 放到最上层 放到最下层
将一个UIView显示在最前面只需要调用其父视图的 bringSubviewToFront()方法。将一个UIView层推送到背后只需要调用其父视图的 sendSubviewToBack()方法。
遍历window的所有子视图
for (UIView *view inself.window.subviews)
{
if ([view isKindOfClass:[QzoneInternalGuideclass]]) {
[self.windowbringSubviewToFront:view];
break;
}
}
遍历controller
NSArray *viewControllers
= self.navigationController.viewControllers;
for (int i
= [viewControllers count] - 1;
i >= 0; --i)
{
UIViewController *controller
= [viewControllers objectAtIndex:i];
if ([controller isKindOfClass:NSClassFromString(@"QZShareAlbumsFeedListController")])
{
((QZShareAlbumsFeedListController *)controller).albumTitleName =
cirInfo.shareAlbumsName;
((QZShareAlbumsFeedListController *)controller).title =
cirInfo.shareAlbumsName;
break;
}
}
一些效果
1.添加阴影self.layer.shadowOffset = CGSizeMake(-5, 3);
self.layer.shadowOpacity = 0.4;
self.layer.shadowColor = [UIColor blackColor].CGColor;
2.添加圆角
btn.layer.cornerRadius = 8;
btn.layer.masksToBounds = YES;//使用边界来做遮罩
设置密文
[self.originalPwd setSecureTextEntry:YES];
视图之UITabBarController结构详解
(侧重于文档分析)http://blog.csdn.net/likendsl/article/details/7620726
遍历方法
通过viewWithTag来找到子viewUIButton *
button = (UIButton *)[self.menu viewWithTag:buttonTag]
IOS设计UI工具大全
http://blog.csdn.net/weiwangchao_/article/details/7606754画分割线
UIView*line = [[UIView alloc] initWithFrame:CGRectMake(0,
containerViewFrame.origin.y+containerViewFrame.size.height+40, 320, 1)];
line.backgroundColor =
[UIColor colorWithRed:0xD9/255.0f green:0xD9/255.0f blue:0xD9/255.0f alpha:1];
[self addSubview:line];
添加子UIView
可以设置 clipsToBounds 属性, 确保子视图不超出上级视图的范围clipsToBounds 默认是NO
设置的坐标是 子视图相对 上级的坐标,所以还可以是负值
UITabBarController
hidesBottomBarWhenPushed 来确认子视图是否显示 下面的tabbar相关文章推荐
- GUI - Web前端开发框架
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- Android布局的小窍门?
- Web布局连载——两栏固定布局(五)
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- 样式表CSS布局经验
- css网页布局中注意的几个问题小结
- DL.DT.DD实现左右的布局简单例子第1/2页
- 使用CSS框架布局的缺点和优点小结
- div+CSS网页布局的意义与副作用原因小结第1/2页
- 为Yahoo! UI Extensions Grid增加内置的可编辑器
- CSS顶级技巧大放送,div+css布局必知
- 在IE 浏览器中使用 jquery的fadeIn() 效果 英文字符字体加粗
- 用div实现像table一样的布局方法
- UI Events 用户界面事件
- 精彩的Bootstrap案例分享 重点在注释!(选项卡、栅格布局)
- 基于jQuery UI CSS Framework开发Widget的经验
- jquery ui 1.7 ui.tabs 动态添加与关闭(按钮关闭+双击关闭)
- jQuery UI的Dialog无法提交问题的解决方法