{"id":608,"date":"2014-08-02T18:24:51","date_gmt":"2014-08-02T10:24:51","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=608"},"modified":"2016-07-15T17:27:05","modified_gmt":"2016-07-15T09:27:05","slug":"ios%e5%bc%80%e5%8f%91%e4%b8%ad%e5%88%9b%e5%bb%ba%e7%ae%80%e6%98%93%e8%ae%a1%e6%97%b6%e5%99%a8%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/project\/2014\/08\/02\/182451608.html","title":{"rendered":"iOS\u5f00\u53d1\u4e2d\u521b\u5efa\u7b80\u6613\u8ba1\u65f6\u5668\u4f7f\u7528"},"content":{"rendered":"<p><strong>1\u3001\u521b\u5efa\u8ba1\u65f6\u5668<\/strong><\/p>\n<pre lang=\"objc\" line=\"1\">\nNSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(calledMethods:) userInfo:nil repeats:YES];\n\/\/ \u6bcf3\u79d2\u8c03\u7528\u4e00\u6b21\u65b9\u6cd5\n- (void)calledMethods:(id)timer\n{\n      \/\/ \u5faa\u73af\u5185\u5bb9\n}<\/pre>\n<p>2\u3001\u6682\u505c\u8ba1\u65f6\u5668<\/p>\n<pre lang=\"objc\" line=\"1\">timer.fireDate = [NSDate distantFuture];<\/pre>\n<p>3\u3001\u91cd\u65b0\u542f\u7528\u8ba1\u65f6\u5668<\/p>\n<pre lang=\"objc\" line=\"1\">timer.fireDate = [NSDate date];<\/pre>\n<p>4\u3001\u505c\u6b62\u8ba1\u65f6\u5668<\/p>\n<pre lang=\"objc\" line=\"1\">[timer  invalidate];<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u521b\u5efa\u8ba1\u65f6\u5668 NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(calledMethods:) userInfo:nil repeats:YES]; \/\/ \u6bcf3\u79d2\u8c03\u7528\u4e00\u6b21\u65b9\u6cd5 &#8211; (void)calledMethods:(id)timer { \/\/ \u5faa\u73af\u5185\u5bb9 } 2\u3001\u6682\u505c\u8ba1\u65f6\u5668 timer.fireDate = [NSDate distantFuture]; 3\u3001\u91cd\u65b0\u542f\u7528\u8ba1\u65f6\u5668 timer.fireDate = [NSDate date]; 4\u3001\u505c\u6b62\u8ba1\u65f6\u5668 [timer invalidate];<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[20],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","category-project","tag-basics"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=608"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/608\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}