码迷,mamicode.com
首页 >  
搜索关键字:cgrect    ( 583个结果
IOS绘图——简单三角形
#import @interface MyView : UIView@end#import "MyView.h"@implementation MyView- (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFra....
分类:移动开发   时间:2015-02-10 00:21:47    阅读次数:154
添加阴影效果
1 @implementation ICSDropShadowView 2 3 - (void)drawRect:(CGRect)rect 4 { 5 self.layer.shadowOffset = CGSizeZero; 6 self.layer.shadowOpacity...
分类:其他好文   时间:2015-02-07 11:35:23    阅读次数:133
UICollectionView的常用方法
class UICollectionView : UIScrollView//初始化,位置,风格 init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) //布局风格var collectionViewLayo...
分类:其他好文   时间:2015-02-05 11:13:11    阅读次数:126
UIView常见属性
@property(nonatomic) CGRect frame;控件所在矩形框在父控件中的位置和尺寸(以父控件的左上角为坐标原点)可以定义控件的位置origin和大小size@property(nonatomic) CGRect bounds;控件所在矩形框的位置和尺寸(以自己左上角为坐标原点,...
分类:其他好文   时间:2015-02-04 16:04:10    阅读次数:153
iOS xib的使用详解
1.File’s Owner为nil UIView *demo1 = [[[NSBundle mainBundle] loadNibNamed:@"demo1" owner:nil options:nil] lastObject]; CGRect rect = demo1.frame; rec...
分类:移动开发   时间:2015-02-03 20:59:18    阅读次数:565
UIView的常用方法
UIView : UIResponder + (Class)layerClass;- (instancetype)initWithFrame:(CGRect)frame;//是否可点击@property(nonatomic,getter=isUserInteractionEnabled) BOOL ...
分类:其他好文   时间:2015-02-03 14:42:04    阅读次数:134
uiscrollview 滚动
获取当前滚动到的位置- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ CGRect bounds = self.scrollview.bounds; CGPoint offset = self.scrollview.co...
分类:其他好文   时间:2015-01-30 17:01:26    阅读次数:144
IOS使用CGContextRef动态画折线图
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextClearRect(context, rect); CGContextSetLineWidth(context, _lineWidth); ...
分类:移动开发   时间:2015-01-28 17:58:57    阅读次数:183
自己实现的输入框控件
公司设计问我这样效果好不好做,正好赶上公司断网了,我就研究了下,感觉CAGroupAnimation加上CAShapeLayer可以实现,就写了下。最后也实现了。 先来拆分小动画,1.背景框收缩2,placeholder组动画。 ①shapeLayer CGRect roundRect = CGRectInset(self.bounds, 0, 10);    ...
分类:其他好文   时间:2015-01-28 14:49:30    阅读次数:285
UITextField的placeholder文字的位置,颜色等的自定义设置
首先想到的是如果系统默认的没有能改变的,那就自定义添加不同的重写该控件的方法我们有时需要定制化UITextField对象的风格,可以添加许多不同的重写方法,来改变文本字段的显示行为。这些方法都会返回一个CGRect结构,制定了文本字段每个部件的边界范围,甚至修改placeHolder颜色,字体。 –...
分类:其他好文   时间:2015-01-27 01:50:19    阅读次数:6939
583条   上一页 1 ... 42 43 44 45 46 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!