i want to create a cluster of buttons.for this i am using a loop like this.
for (int i =0; i< [plistArray count];i++) {
editButton = [[UIButton alloc]initWithFrame:CGRectMake(width-10, -3.6, 39, 35)];
[editButton setImage:[UIImage imageNamed:@"DeleteButton.png"] forState:UIControlStateNormal];
[editButton addTarget:self action:@selector(deleteObjectViewImage:) forControlEvents:UIControlEventTouchUpInside];
}
but when i clicked on any random button assigned function is not called.It called when i clicked first button(in a sequence 1,2,3).
Here’s one: