一、随机数的声称 1、 arc4random()%10 2、 arc4random_uniform(10) 两种方法产生的效果都是一样的! 二、UIView的常见方法 1、addSubview [self.view addSubview:newView]; 2、NSarrary* subviews这...
分类:
其他好文 时间:
2015-04-05 23:29:54
阅读次数:
209
解决方式1:self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 0.01f)];解决方式2:self.table...
分类:
其他好文 时间:
2015-04-05 20:22:57
阅读次数:
178
QuartzCore类库:常用的类CALayer 绘图的图层CAAnimation 抽象的动画类,有一些基本的属性,时间函数等CAPropertyAnimation 继承CAAnimation 还是抽象类,抽象出一些keyPath之类的属性CABasicAnimation继承自CAPropertyA...
分类:
移动开发 时间:
2015-04-05 14:30:09
阅读次数:
302
从零开始读MBProgressHUD(三)-layoutSubviews本文主要技术点如下:
-layoutSubviews的主要作用
-layoutSubviews的调用
setNeedsLayout和layoutIfNeeded的区别
分析MBProgressHUD类的-layoutSubviews代码
-layoutSubviews的主要作用-layoutSubviews是UIView的属性方...
分类:
其他好文 时间:
2015-04-04 09:19:15
阅读次数:
228
UIView
*view
=
[[UIView
alloc]
initWithFrame:CGRectMake(120,10,80,80)];
view.backgroundColor
=
[UIColor
redColor];[self.view
addSubview:view2];
UIBezierPath
*maskPath
=
[UIBezierPath
be...
分类:
其他好文 时间:
2015-04-03 15:18:56
阅读次数:
129
http://mobile.51cto.com/iphone-469498.htm如你所知,我们在iOS应用中看到的都是视图(view),包括按钮视图、表视图、滑动条视图,还有可以容纳其他视图的父视图等。但你或许不知道在iOS中支撑起每个视图的是一个叫做"图层(layer)"的类,确切地说是CALa...
分类:
移动开发 时间:
2015-04-02 15:00:04
阅读次数:
269
#import @interface CircleProgressView : UIView/**进度值*/@property(nonatomic,assign) CGFloat progressValue;@end#import "CircleProgressView.h"@implementa....
分类:
其他好文 时间:
2015-04-02 10:23:12
阅读次数:
131
情景是这样的,我UITableView添加了一个HeaderView,这个HeaderView是通过xib创建,是UIView。出来的结果却出乎意料,UITableView的Cell最顶部的几个被HeaderView给遮挡了~~~我勒个去~~神马情况???!!! 于是哥通过看层次结构,发现运行...
分类:
移动开发 时间:
2015-04-01 19:55:25
阅读次数:
221
UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 20)]; statusBarView.backgroundColor=[UIColor blackColor]; [se...
分类:
其他好文 时间:
2015-04-01 19:35:52
阅读次数:
91
UILabel的相关操作:①初始化:UILabel是UIView的子类,拥有UIVi所有办法 UILable *label = [[UILabel alloc] initWithFrame:CGRectMake(,,,);②背景颜色 label.backgroundColor = [UIColor ...
分类:
其他好文 时间:
2015-04-01 19:15:10
阅读次数:
129