I have a block property that looks like this:
@property (nonatomic, copy) void (^indexChangeBlock)(NSInteger index);
When I try to set the value for this property, Xcode autocomplete will omit the parameter name leaving me with something like this:
[self.segmentedControl3 setIndexChangeBlock:^(NSInteger) {
code
}];
Then Xcode shows a Parameter name omitted error. I’m aware that I can solve this by adding the parameter name manually to make it look like this:
[self.segmentedControl3 setIndexChangeBlock:^(NSInteger index) {
code
}];
My questions is, how can I make Xcode add the parameters names automatically. Or in other words, prevent it from removing them.
possible solution:
and define your property with
and if you add
everything should work