objective c - iOS 4 - Using blocks as a member of a class -
i hoping me understand syntax of blocks when used members of class. have code that's working fine:
@class structure; typedef void (^structuredeletecallback)(structure *); @interface structurelistdelegate : nrfctabledelegate { structuredeletecallback _structuredeletecallback; } @property (nonatomic, copy) structuredeletecallback structuredeletecallback; @end
this works, understand syntax of typedef
statement; , whether or not it's required use typedef.
what i've read says using typedef
in situation recommended because makes code lot clearer; i've been unable compile @ when trying without typedef
. understanding of typedef syntax basically:
typedef [actual type] [new name type];
such as:
typedef double cllocationdegrees;
but syntax of typedef
statement doesn't match this. questions are:
- how can syntax of
typedef
statement different othertypedef
statements / syntax i'm using mean compiler? - is possible have block member of class without using
typedef
?
i myself have asked question along lines of yours here: block references instance vars in objective-c
Comments
Post a Comment