I have a button which is animated out from (hidden->unhidden) on a uitableViewCell.
there are a imageview and a button at the same rect position In the tableViewCell,When user select one of tableviewcell from tableview, the imageView animate to hidden and the button animate to show.Two of the view(imageView&button) are load from a xib file. I have added a action to the button and link it with a IBAction method.
My Question:when user touch at the button, the action method have not been invoked, Why?
[UIView beginAnimations:cell.id context:nil];
[UIView setAnimationDuration:1.0f];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(focusCellFinished:finished:context:)];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:cell.containerView cache:YES];
cell.imagePhoto.hidden = true;
cell.playButton.hidden = false;
[UIView commitAnimations];
when user select a button, tableView:didSelectRowAtIndexPath: will be invoked, i don’t need that, i just want to invoke the button method.
BTW,I know and try if just add a button normal without animate disappear, it can add a target action and be invoked successfully.
Any answer and comments will be appreciated, Thanks.
try like this,
here change the value of
CGAffineTransformMakeTranslation (x,y);according to your frame position