读书人

除去ASIHttpRequset中request在block的

发布时间: 2013-09-30 09:50:49 作者: rapoo

去掉ASIHttpRequset中request在block的警告

在使用ASIHttpRequest时,在setCompletionBlock和setFailedBlock中有"Capturing 'request' strongly in this block is likely to lead to a retain cycle"这样的警告。为了去掉这样的警告在iphone5.0以上的sdk中只需要把__block置换为__weak,就能解决掉这个警告。

读书人网 >移动开发

热点推荐