How to write an Objective-C Completion Block

后端 未结 5 2065
萌比男神i
萌比男神i 2020-12-01 01:45

I\'m in a situation where need to call a class method from my view controller, have it do it\'s thing, but then perform some actions ONLY AFTER the class method has complete

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 02:45

    I always use this when I want to write a block:

    http://fuckingblocksyntax.com

    EDIT

    If you are writing Swift then use this:

    http://fuckingswiftblocksyntax.com

    If the above links are not opening because of the obscene language, use this one.

    http://goshdarnblocksyntax.com/

提交回复
热议问题