在Windows时代,大家肯定对SendMessage,PostMessage,GetMessage有所了解,这些都是windows中的消息处理函数,那对应在ios中是什么呢,其实就是NSRunloop这个东西。在ios中,所有消息都会被添加到NSRunloop中,分为‘input source’跟...
分类:
移动开发 时间:
2015-09-02 14:49:35
阅读次数:
200
可以使用UIScrollView、UIPageControl、NSTimer来创建,scrollview是图片的展示区域,UIPageControl是一行小圆点,用来表示当前展示的是多页面中的第几页,NSTimer用来循环执行某事件。这里边比较重要的方法是scrollViewDidScroll,就是...
分类:
其他好文 时间:
2015-09-01 16:47:11
阅读次数:
188
比如: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