CoreGraphics中有关CGRect相关函数笔记 1、CGRectInset 2、CGRectOffset ...
分类:
其他好文 时间:
2016-09-29 09:34:47
阅读次数:
144
@implementation TWPaperTimeCountLabel { NSInteger miaoshu; dispatch_source_t _timer; } -(id)initWithframe:(CGRect)frame endTime:(NSDate *)endtime dele ...
分类:
其他好文 时间:
2016-09-28 12:11:30
阅读次数:
142
当字符串长度未知,需要动态设置一个UI控件的高度和宽度(比如一个UILabel),这时需要计算字符串的长度 //两个重要参数,一个是最大的宽度,一个是字体的font值 //返回的CGRect 对象,包括宽度和高度值 ...
分类:
其他好文 时间:
2016-09-24 18:55:04
阅读次数:
204
UIBezierPath贝塞尔弧线常用方法 UIBezierPath贝塞尔弧线常用方法 //根据一个矩形画曲线 + (UIBezierPath *)bezierPathWithRect:(CGRect)rect //根据矩形框的内切圆画曲线 + (UIBezierPath *)bezierPathW ...
分类:
其他好文 时间:
2016-09-22 11:35:06
阅读次数:
132
有时候,知道initWithFrame方法如何用,但是么有弄明白initWithFrame方法到底是什么? 那就通过查资料弄明白。 1. initWithFrame方法是什么? initWithFrame方法用来初始化并返回一个新的视图对象,根据指定的CGRect(尺寸)。 当然,其他UI对象,也有 ...
分类:
其他好文 时间:
2016-09-18 22:21:37
阅读次数:
169
Objective-C 几何类常用方法整理 CGGeometry参考定义几何结构和功能,操作简单。数据结构中的一个点CGPoint代表在一个二维坐标系统。数据结构的位置和尺寸CGRect代表的一个长方形。数据结构的尺寸CGSize代表宽度和高度。 1、创建一个几何原始数值 CGPoint CGPoi ...
分类:
其他好文 时间:
2016-09-10 19:11:36
阅读次数:
194
如题,ios相机的取景框的中心点,与当前应用视图的中心点并不重合。那如果想在正中央加一个视图,应该怎么做呢? 取景框的frame是 CGRect theOverLayFrame = CGRectMake(30, 95, 260, 320);所以中心点坐标应该是(160,255)。 不要问我怎么知道的 ...
分类:
移动开发 时间:
2016-09-07 20:52:57
阅读次数:
163
CGRect senderFrame = cell.senderLabel.frame; CGRect creatAtFrame = cell.creatAtLabel.frame; CGSize senderSize = [cell.senderLabel.text sizeWithAttribu ...
分类:
其他好文 时间:
2016-09-05 10:38:40
阅读次数:
182
- (void)drawRect:(CGRect)rect { // Drawing code NSLog(@"drawRect自动调用"); //画图步骤 //获取上下文(/画笔/绘图环境) CGContextRef context = UIGraphicsGetCurrentContext(); ...
分类:
其他好文 时间:
2016-08-29 00:03:32
阅读次数:
279
//传入数据,饼状图 pieChartView.dataArr = @[@20,@50,@80,@70,@40]; - (void)drawRect:(CGRect)rect { // Drawing code #if 0 //贝塞尔路径 UIBezierPath *path = [UIBezier ...
分类:
其他好文 时间:
2016-08-28 23:56:50
阅读次数:
199