1、在坐标系的转换中,这下面两种方式是等价一样 对应的意思就是说:我们的view1的从以原来的坐标系转化为以view2的原点为坐标系[心的frame就是以两个坐标系的点的值差]CGRect *frame1 = [self.view1 convertRect:self.view1.bounds to....
分类:
其他好文 时间:
2015-06-16 21:01:05
阅读次数:
121
1:IOS7状态栏覆盖页面问题: 前 后 当然这也是临时解决方案,最好还是兼容状态栏UI更美观 代码如下: if?([[[UIDevice?currentDevice]?systemVersion]?floatValue]?>=?7)?{
????????CGRect?vie...
分类:
移动开发 时间:
2015-06-16 17:09:58
阅读次数:
118
+ (UIImage *)blurWithCoreImage:(UIImage *)sourceImage withFrame:(CGRect)frame{ CIImage *inputImage = [CIImage imageWithCGImage:sourceImage.CGImage]; ....
分类:
移动开发 时间:
2015-06-16 16:39:09
阅读次数:
128
Foundation框架中包含了很多常用的数据类型:结构体枚举类结构体NSRange 表示范围NSPoint\CGPoint 位置NSSize\CGSize 尺寸NSRect\CGRect 包含位置,尺寸(CGPoint,CGSize)
分类:
其他好文 时间:
2015-06-16 12:36:25
阅读次数:
96
#import //自定义头文件@interface CustomView : UIView-(id)initWithFrame:(CGRect)frame dataArray:(NSMutableArray *)dataArray;-(id)initWithFrame:(CGRect)frame ...
分类:
编程语言 时间:
2015-06-15 11:11:45
阅读次数:
107
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
//初始化:TimesPickerView=[[UIPickerViewalloc]initWithFrame:CGRectZero];CGRect pickerRect=CGRectMake(w, h, x,y);TimesPickerView.frame=pickerRect;TimesPick...
分类:
其他好文 时间:
2015-06-14 13:43:24
阅读次数:
154
// 1CGRectInsetIf you need to create a rectangle that is either larger or smaller than an existing rectangle, centered on the same point, try CGRectIn...
分类:
其他好文 时间:
2015-06-13 21:29:21
阅读次数:
110
一、关于矩阵操作1.画一个四边形通过设置两个端点(长和宽)来完成一个四边形的绘制。代码: 1 - (void)drawRect:(CGRect)rect 2 { 3 //画四边形 4 //获取图形上下文 5 CGContextRef ctx=UIGraphicsGetCurr...
分类:
移动开发 时间:
2015-06-13 14:06:01
阅读次数:
224
1、根据一个矩形画曲线+ (UIBezierPath*)bezierPathWithRect:(CGRect)rect2、根据矩形框的内切圆画曲线+ (UIBezierPath*)bezierPathWithOvalInRect:(CGRect)rect3、根据矩形画带圆角的曲线+ (UIBezie...
分类:
移动开发 时间:
2015-06-12 14:40:09
阅读次数:
132