New to ios. Let me correct if my understanding is wrong?.
typedef void (^someString) (datatype variable_name, datatype variable_name).
I am basically from C background.
It is something like a typedef to function pointer ?..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not exactly a function pointer, but a block. A block is an Apple extension to the C language: basically it implements lambda functions. It typedefs the
someStringtype to a block returning nothing (void) and taking two arguments.Read more here:
http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
and here:
http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Blocks/Articles/bxUsing.html