block with return value

Logic.h

Logic.m

…then when you access the method call with your own block definition like so:

How it runs through…

First, the code runs until it hits return userPwdChangedBlk(TRUE, newPwd);

We get the new password, then pass in TRUE, and the new password so the block of the caller can run.

So in the outside processSave method, the TRUE and new password gets passed into the parameter, and you evaluate it. Then return TRUE or FALSE.

This return from the onSuccess block will be the result of

in Logic.m’s