码迷,mamicode.com
首页 >  
搜索关键字:bounds    ( 955个结果
UIImage
将一个View保存为PNG保存到本地1.首先写一个UIImage的分类,加入这个方法。+ (UIImage *)imageWithView:(UIView *)view { UIGraphicsBeginImageContextWithOptions(view.bounds.size, vie...
分类:其他好文   时间:2015-06-15 12:59:52    阅读次数:97
ios中navigationItem的titleView如何居中
CGRect rect = [UIScreen mainScreen].bounds; ? ? _friendsCircleTitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,140, 44)]; ? ? _friendsCircleTitleView.backgroundColor = [UIColor clearCo...
分类:移动开发   时间:2015-06-14 21:30:38    阅读次数:449
UIView全部API的学习。
/********* UIView是iOS系统界面元素的基础,所有的界面元素都是集成自它。它本身完全是由CoreAnimation来实现的。它真正的绘图部分,是一个叫CALayer(Core Animation Layer)的类来管理的。UIView本身,更像是一个CALayer的管理器 ,访问它的跟绘图和跟坐标有关的属性,例如frame,bounds等等,实际上内部都是在访问它所包含的CALa...
分类:Windows程序   时间:2015-06-12 17:20:12    阅读次数:280
iOS开发——UI篇OC篇&UIView/UIWindow/UIScreen/CALayer
UIView/UIWindow/UIScreen/CALayer1、UIScreen可以获取设备屏幕的大小。1234567// 整个屏幕的大小 {{0, 0}, {320, 480}}CGRect bounds = [UIScreen mainScreen].bounds;NSLog(@"UIScr...
分类:移动开发   时间:2015-06-09 23:17:41    阅读次数:280
ios:给矩形指定角圆角
很简单,用遮罩,代码如下:UIBezierPath *maskPath= [UIBezierPath bezierPathWithRoundedRect:viewRadius.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerB....
分类:移动开发   时间:2015-06-09 19:15:24    阅读次数:134
添加UIVisualEffectView
添加UIVisualEffectViewby 伍雪颖let bgView : UIImageView = UIImageView(image: UIImage(named: "1.jpg")) bgView.frame = self.view.bounds self.view.addSubview(bgView)let blurEffect: UIBlurEffect = UIBlurEffect(...
分类:其他好文   时间:2015-06-09 11:49:28    阅读次数:107
IOS 利用图片设置背景
UIImageView* imageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; imageView.image = [UIImage imageNamed:@"背景灰.png"]; self.vi...
分类:移动开发   时间:2015-06-08 19:17:43    阅读次数:146
iPhone型号判断
//获取屏幕的宽度 #define kScreenWidth [UIScreen mainScreen].bounds.size.width #define kScreenHeight [UIScreen mainScreen].bounds.size.height //判断时iPhone几 #define kDoubleMargin 0.00001 #def...
分类:其他好文   时间:2015-06-05 15:50:19    阅读次数:121
显示动画基本属性
记录下显示动画的部分基本属性: opacity transform.scale transform.scale.x transform.scale.y transform.rotation.z margin zPosition backgroundColor cornerRadius borderWidth bounds contents contentsRect co...
分类:其他好文   时间:2015-06-05 10:18:06    阅读次数:138
iOS开发——图形编程OC篇&(五)CALayer创建图层
CAlayer(创建图层)一、添加一个图层添加图层的步骤:1.创建layer2.设置layer的属性(设置了颜色,bounds才能显示出来)3.将layer添加到界面上(控制器view的layer上) 1 // 2 // YYViewController.m 3 // 01-创建一个简单的图层 .....
分类:移动开发   时间:2015-06-04 22:31:27    阅读次数:237
955条   上一页 1 ... 70 71 72 73 74 ... 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!