how to create a block in objective c define a block in .h file /*here i created a block addPhysicsBody is the name of block ^ without is block can’t be completed so block is defined ^addPhysicsBody typedef void (^addPhysicsBody)( CGPoint ); where void is return type and CGpoint is parameter where bolded part is a parameter taken by block 2) step 2 @property (copy) addPhysicsBody clickBlock; add block as a property and please remember that this property is copy because a block needs to be copied to keep track of its captured state outside of the original scope by apple define a function in .h file that takes block as a parameter this is necessary while creating block with function - (void)getPhysicsBody:( void (^)(CGPoint) )finishBlock; where above bolded part is block with its para...
all about coding especially in javascript, daily used algorithms, react, angular and other gaming stuffs like webgl, pixijs, three.js and cocos2dx running code sample especially in javascript and c++.