//将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;//将像素point从view中转换到当前视图中,返回在当前视图中的像素值- (...
分类:
移动开发 时间:
2015-08-20 01:09:04
阅读次数:
241
我一般情况下不会使用interface builder去画界面,而是用纯代码去创建界面,不是装B,而是刚从vi转到xcode不久,不太习惯interface builder而已。当然如果需要我也会使用它。一个东西的存在没有绝对的好与坏,只是存在时间与空间决定了它的价值。(忘了讲了,我的环境是xcod...
因为项目需要画虚线,起初想用图片重复叠加实现。搜罗了一圈还是封装一个UIView
代码如下
.h文件
#import
@interface DashesLineView : UIView
@property(nonatomic)CGPoint startPoint;//虚线起点
@property(nonatomic)CGPoint endPoint;//虚线终点
@pro...
分类:
移动开发 时间:
2015-08-17 17:23:01
阅读次数:
190
UIScrollView作者:woainilsr原地址:http://www.cnblogs.com/woainilsr/archive/2012/03/28/2421881.html属性作用CGPoint contentOffSet监控目前滚动的位置CGSize contentSize滚动范围的大...
分类:
其他好文 时间:
2015-08-14 21:23:06
阅读次数:
138
@property(nonatomic) CGPoint contentOffset; // default CGPointZero@property(nonatomic) CGSize contentSize; //...
分类:
移动开发 时间:
2015-08-12 16:27:56
阅读次数:
193
CGPoint offset = self.collectionView.contentOffset; (self.collectionView.contentOffset.y > 0) ? offset.y-- : offset.y++; [self.collectionView setConte...
分类:
移动开发 时间:
2015-08-12 13:10:39
阅读次数:
148
来自:http://blog.csdn.net/lgm252008/article/details/34819743 UIBezierPath通过 - (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAn...
分类:
其他好文 时间:
2015-08-11 10:21:41
阅读次数:
123
frame,bounds,center,position,anchorPoint总结图层的position属性是一个CGPoint的值,它指定图层相当于它父图层的位置, 该值基于父图层的坐标系。图层的bounds属性是一个CGRect的值,指定图层的大小(bounds.size)和图层的 原点(bo...
分类:
移动开发 时间:
2015-08-07 23:47:32
阅读次数:
3279
通过下面的代码,又可以将NSValue转换成CGRect,CGPoint等类型的数值。CGRect imageRect = [[self.lockImageRectArray objectAtIndex:l] CGRectValue];通过NSValue就可以实现CGxxx类型的数值存储在NSMut...
分类:
其他好文 时间:
2015-08-06 10:59:43
阅读次数:
112
一、CGPoint定义一个点,两个参数分别是x,y1>CGPoint p = {100,100};2>CGPoint p; p.x = 100; p.y = 100;3>CGPoint p = CGPointMake(100,100);二、CGSize定义一个大小:两个参数分别是width , .....
分类:
移动开发 时间:
2015-08-03 06:25:59
阅读次数:
143