i have create a UIBUtton
editButton = [[UIButton alloc]initWithFrame:CGRectMake(width, -4, 30, 30)];
[editButton setImage:[UIImage imageNamed:@"DeleteButton.jpg"] forState:UIControlStateNormal];
[editButton addTarget:self action:@selector(deleteObjectViewImage:) forControlEvents:UIControlEventTouchUpInside];
editButton.hidden = YES;
[editButton setTag:tag];
[backView addSubview:editButton];
But control not jump to its definition where i check if button give its tag value on click or not.
–
(void)deleteObjectViewImage
{
NSInteger index = editButton.tag;
editButton.hidden = YES;
}
Can anyone tell me why it not work please.
Use this line instead of line in your code (colon removed after function name),