5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ブロック内でselfを使うと「Capturing self strongly in this block is likely to lead to a retain cycle」と出る場合には

Posted at

ブロックの外でまず

    __unsafe_unretained typeof(self) weakSelf = self;

と宣言して、 ブロック内ではweakSelfを用いる

###Reference
http://stackoverflow.com/questions/14556605/capturing-self-strongly-in-this-block-is-likely-to-lead-to-a-retain-cycle

5
7
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?