比如:NSMutableDictionary *dic = [[NUMutableDictionary alloc]init];[dic setValue:@”haha” forKey:@”test”][NSTimer scheduledTimerWithTimeIntervatal:2.0 tar...
分类:
移动开发 时间:
2015-08-31 21:40:11
阅读次数:
202
1、NSTimer叫做“定时器”,它的作用如下Ø 在指定的时间执行指定的任务Ø 每隔一段时间执行指定的任务2、调用NSTimer下面的方法就会开启一个定时任务+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:....
分类:
移动开发 时间:
2015-08-31 21:17:56
阅读次数:
141
NSTimerA timer provides a way to perform a delayed action or a periodic action. The timer waits until a certain time interval has elapsed and then fires, sending a specified message to a specified obje...
分类:
移动开发 时间:
2015-08-29 23:20:37
阅读次数:
281
一、UIScrollView属性1.常见的属性// 移动的位置
@property(nonatomic) CGPoint contentOffset;
// 内容的大小
@property(nonatomic) CGSize contentSize;
// 四边扩展的边距
@property(nonatomic) UIEdgeInsets contentInset;2.其他属性// 弹簧效果
@pr...
分类:
移动开发 时间:
2015-08-29 06:20:53
阅读次数:
183
既然NSTimer容易造成内存泄露,那就给初出茅庐的小程序员们带来一个惊喜吧!
话不多说上代码:
LIST-(void)startTime{
timeout_int=0;
dispatch_queue_t queue_global =dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatc...
分类:
其他好文 时间:
2015-08-28 23:21:12
阅读次数:
139
1 #import "ViewController.h" 2 3 @interface ViewController () 4 @property(strong,nonatomic)UIScrollView * ScrollView; 5 @property(strong,nonato...
分类:
其他好文 时间:
2015-08-26 15:17:39
阅读次数:
195
NSTimer 怎么暂停继续转载自:http://blog.csdn.net/chentoo/article/details/8667918那,API里面NSTimer 是木有暂停继续的方法的,只有fire和invalidate,前者是开工的意思,后者是废掉的意思,如果用废掉来代替暂停的功能?显然是...
分类:
其他好文 时间:
2015-08-21 11:12:45
阅读次数:
132
此次app更新解决的问题1.首页字体2.订单取消的“取消按钮”,不能及时刷新数据3.圈子控件4.评价5.积分6.首页刷新7.提交订单后只能点击“付款方式”或“再逛逛”其中实时刷新数据出现问题,测试了很长时间,几乎花了一下午时间。结果是NSTimer sch方法的话用invalid后不能再重新使用,我...
分类:
其他好文 时间:
2015-08-20 20:45:29
阅读次数:
444
总体思路如下: 利用for 循环创建N个view,并将他们添加到可变数组中,利用NSTimer,实现循环变色的效果(changeColor:),变色的思路:将第i个view 的背景色 和第i + 1 个view 的背景色交换,换完一轮即可,(NSTimer 会自动实现循环)这里是在试图控制器中写的,...
分类:
移动开发 时间:
2015-08-16 19:47:57
阅读次数:
170
欢迎界面,还是比较简单的,一个UIScrollView控件,一个UIPageControl,几个UIImageView即可摆平。在这里光玩这些,就显得诚意不足了。特意拓展一下,再加几个UIButton,可以让这个欢迎界面变成可点击的,可滑动的模块添加在页面中,然后再加一个NSTimer,让它自己.....
分类:
移动开发 时间:
2015-08-15 13:20:37
阅读次数:
195