I'm creating an iphone app that at one page before you can move on to the next you have to select a button or an alert will pop up.
.h
<UIAlertViewDelegate>
@property (nonatomic, retain) IBOutletCollection(UIButton) NSArray *buttons;
.m
-(BOOL)validateTag:(NSArray *)buttons {
[self.buttons enumerateObjectsUsingBlock:^(id obj) {
UIButton *button = (UIButton *)obj;
if (button != button.enabled){
return NO;
}
return YES;
} ];
}
-(IBAction)save:(id)sender{
if (![self validateTag:_buttons]) {
[self alertMessage:@"Invalid ":@"Please choose a Tag"];
return;
}
else {
....display other viewcontroller
}
The error I'm getting is
`Incompatible pointer types sending bool to parameter of type void`
on line
[self.buttons enumerateObjectsUsingBlock:^(id obj)
Anyways of getting around this?
Thanks.