摘要: //region 跨域 function GetPersonList() { $.ajax({ type: "get", async: false, url: "GetPerson", dataType: "jsonp", jsonp: "callback", success: function ( 阅读全文
posted @ 2016-12-13 14:23 爱上-睡觉 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 两种方式,但稍有区别 1,in 运算符 var obj = {name:'jack'}; alert('name' in obj); // --> true alert('toString' in obj); // --> true 可看到无论是name,还是原形链上的toString,都能检测到返 阅读全文
posted @ 2016-10-09 13:18 爱上-睡觉 阅读(219) 评论(0) 推荐(0) 编辑
摘要: NSOpertaionQueue用GCD构建封装的,是GCD的高级抽象。GCD仅仅支持FIFO队列,而NSOperationQueue中的队列可以被重新设置优先级,从而实现不同操作的执行顺序调整。GCD不支持异步操作之间的依赖关系设置。如果某个操作的依赖另一个操作的数据(生产者-消费者模型是其中之一 阅读全文
posted @ 2016-01-29 10:58 爱上-睡觉 阅读(345) 评论(0) 推荐(0) 编辑
摘要: #ifedf DEBUG#define IosLog(...) NsLog(__VA_ARGS__)#end if 阅读全文
posted @ 2015-12-18 21:45 爱上-睡觉 阅读(113) 评论(0) 推荐(0) 编辑
摘要: //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:indexSetwithRowAnimation:UITableViewRowAnimationAuto... 阅读全文
posted @ 2015-12-15 09:18 爱上-睡觉 阅读(89) 评论(0) 推荐(0) 编辑