Wednesday, 28 August 2013

How to get the correct autocomplete in XCode for a block variable?

How to get the correct autocomplete in XCode for a block variable?

I have a block thats stored as an instance variable in a class
typedef void ((^didSelectWord)(NSString* word));
@property (nonatomic,strong) didSelectWord wordSelected;
and i want xcode to auto fillout the block like when you type [UIView
animateWithDuration and xcode autocompletes a block for it.
When i autocomplete my block it just fills out
[self.suggestedSearchTermView setWordSelected:(didSelectWord)wordSelected
instead of
[self.suggestedSearchTermView setWordSelected:^(NSString *word) {
Is it possible to change something to make Xcode understand how to
autocomplete this block?

No comments:

Post a Comment