I want to know exactly, how to write a function that return block. Block syntax weird, as you know. The best solution i find, is following:
typedef void(^MyAwesomeBlock)(void);
MyAwesomeBlock blockFunction()
{
MyAwesomeBlock block = ^{
//some code;
};
return block;
}
Yeah, awesome, it work with typedef and it pretty neat, but, how to write correctly the same function without it?
I could put here a code that i tried, but i think that is no reason to do so, because it's just warn me with compiler errors all time.
Would you be so kind, to show me solution without typedef
? Just a typical function, that return block. Thanks.
Trying following not work as well.