码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
UIView 添加闪烁的渐变光
CGRect gradientRect=CGRectMake(- imageView3.bounds.size.width*1.5, 0, 4 * imageView3.bounds.size.width, imageView3.bounds.size.height); CAGradientLaye... ...
分类:其他好文   时间:2016-12-13 16:18:33    阅读次数:261
NSMutableAttributedString
开发过程中,经常会遇到动态计算行高的问题, - (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options attributes:(nullableNSDictionary<NSString *, ...
分类:其他好文   时间:2016-12-11 15:12:16    阅读次数:223
UICollectionView瀑布流的实现
实现瀑布流的效果我们可以通过重写 UICollectionViewLayout里面 - (void)prepareLayout; - (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect; - (UICollectionViewLayou ...
分类:其他好文   时间:2016-12-09 16:03:46    阅读次数:182
Swift - 多行文本输入框(UITextView)
1,多行文本控件的创建 1 2 3 4 let textview = UITextView(frame:CGRect(x:10, y:100, width:200, height:100)) textview.layer.borderWidth = 1 //边框粗细 textview.layer.b ...
分类:编程语言   时间:2016-12-02 09:49:18    阅读次数:372
iOS编程(双语版)-视图-Frame/Bounds/Center
1. Frame 每个视图都有一个frame属性,它是CGRect结构,它描述了视图所在的矩形在其父视图中的位置。 (屏幕坐标系默认的原点在左上角,x轴向右伸展,y轴向下伸展) 设置frame通常通过视图的指定初始化器initWithFrame 下面来看个例子,该例子初始化了3个相互叠加的矩形区域 ...
分类:移动开发   时间:2016-11-26 02:15:05    阅读次数:293
继承MJRefresh的自定义刷新控件
#import "SLRefreshHeader.h"@implementation SLRefreshHeader- (instancetype)initWithFrame:(CGRect)frame{ if (self = [super initWithFrame:frame]) { // 自动 ...
分类:其他好文   时间:2016-11-12 11:19:50    阅读次数:157
ios简单更改系统TabBar的高度
- (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; CGRect frame = self.tabBar.frame; frame.size.height = 55; frame.origin.y = self.view.fr ...
分类:移动开发   时间:2016-10-31 12:44:26    阅读次数:157
关于Label要显示的字数确定Label高度
第一步: // 计算字符若显示的宽度与label一样宽时,它需要的高度 CGRect R = [string boundingRectWithSize:CGSizeMake(KScreenWidth,10000) options:(NSStringDrawingUsesLineFragmentOri ...
分类:其他好文   时间:2016-10-27 12:58:23    阅读次数:177
iOS的基本图形绘制
绘图的步骤: 1.获取上下文 2.创建路径(描述路径) 3.把路径添加到上下文 4.渲染上下文 通常在- (void)drawRect:(CGRect)rect这个方法里面绘制图形 为什么要再drawRect里面绘图,只有在这个方法里面才能获取到跟View的layer相关联的图形上下文 一、直线的绘 ...
分类:移动开发   时间:2016-10-14 14:43:20    阅读次数:336
如何在Swift里用UnsafeMutablePointer
下午在适配iPadUI的时候,用到了UIPopoverPresentationController,然后在转屏的时候需要调用UIPopoverPresentationControllerDelegate来返回一个适配后的view和CGRect,这里先看下在OC里的写法: 在OC里面你可以很方便的修改 ...
分类:编程语言   时间:2016-10-10 21:05:11    阅读次数:263
583条   上一页 1 ... 5 6 7 8 9 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!