码迷,mamicode.com
首页 >  
搜索关键字:bounds    ( 955个结果
iOS开发UI篇—CAlayer(创建图层)
一、添加一个图层添加图层的步骤:1.创建layer2.设置layer的属性(设置了颜色,bounds才能显示出来)3.将layer添加到界面上(控制器view的layer上) 1 // 2 // YYViewController.m 3 // 01-创建一个简单的图层 4 // 5 // Cr...
分类:移动开发   时间:2015-11-16 19:20:01    阅读次数:232
判断当前iOS设备的方法
1.在程序中涉及到全屏的宽高的时候,初始化的时候,代码中不要写320和480#define Screen_height [[UIScreen mainScreen] bounds].size.height#define Screen_width [[UIScreen mainScreen] boun...
分类:移动开发   时间:2015-11-16 10:33:35    阅读次数:143
UITableViewCell的两种获取indexPath的方法
1. 通过叫Point获取 CGPoint correctedPoint = [textField convertPoint:textField.bounds.origin toView:self.tableView]; NSIndexPath *indexPath = [self.table...
分类:其他好文   时间:2015-11-14 14:55:34    阅读次数:150
Label 添加表情图片
// 添加表情 NSTextAttachment *attch = [[NSTextAttachment alloc] init]; // 表情图片 attch.image = [UIImage imageNamed:@"d_aini"]; // 设置图片大小 attch.bounds ...
分类:其他好文   时间:2015-11-13 18:34:47    阅读次数:177
【项目】'NSRangeException', reason: '*** -[__NSArrayM removeObjectAtIndex:]: index 2 beyond bounds [0 .. 1]'
问题代码:[self.assetsArray objectAtIndex:indexPath.row]问题解决思路:这里
分类:其他好文   时间:2015-11-10 16:04:09    阅读次数:712
UICollectionView基础用法
#import?"ViewController.h" #define?kScreenSize?[UIScreen?mainScreen].bounds.size //遵守协议 @interface?ViewController?()?<UICollectionViewDataSource,UICollectionViewDelegate> { ????UIC...
分类:其他好文   时间:2015-11-09 14:12:16    阅读次数:190
UIImage拉伸显示
下面张图片,是设计来做按钮背景的:button.png,尺寸为:24x60现在我们把它用作为按钮背景,按钮尺寸是150x50,以下是没有经过技术性拉伸处理的情况://得到view的尺寸CGSizeviewSize=self.view.bounds.size;//初始化按钮UIButton*butto...
分类:其他好文   时间:2015-11-08 14:57:38    阅读次数:231
iOS UIView非常用方法及属性详解
在调用视图的 Quartz 调用都可以正确地在视图中描画。 视图对象通过 bounds 、和 center 属 性声明来跟踪自己的大小和位置。frame 属性包含一个矩形,即边框矩形,用于指定视图相对于其父视图坐标系统的位置和大小。bounds 属性也包含一个矩形,即边界矩形,负责定义视图相对于本地...
分类:移动开发   时间:2015-11-08 14:20:21    阅读次数:1947
UITableView
// 初始化VIEW UITableView *tableView = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain]; tableView.dataSource = self; ...
分类:其他好文   时间:2015-11-07 13:28:16    阅读次数:150
IOS ScrollView pagingEnabled移动指定偏移
scrollView的宽度设置为你想要平移的宽度。比如一次平移 200, 可以将scrollView的frame 设置为 self.scrollView.frame=CGRectMake(0,0,200, [[UIScreenmainScreen]bounds].size.width); co...
分类:移动开发   时间:2015-11-06 17:49:46    阅读次数:277
955条   上一页 1 ... 53 54 55 56 57 ... 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!