Which NSAssertion should be used inside a block?

We cannot use NSAssertion inside blocks because this macro uses self to create a save loop, as commented here: http://www.takingnotes.co/blog/2011/09/27/making-nsassert-play-nice- with-blocks / My question is: what statements should I use inside the block?

+4
source share
2 answers

I usually use NSCAssert()in these cases. It fails selfand is also useful for statements inside C-functions.

+5
source

self , @weakify(self) @strongify(self) , .

-1

Source: https://habr.com/ru/post/1618131/


All Articles