I want to click _transitButton
to call onTransitButtonDidClick
to move _rightView
.
The problem is the button cannot do as I set self.transitButton.frame = CGRectMake(0, 0, 30, 20);
.
update:
_transitButton
original frame is (0,280,30,20)
the result is, the button move from the original frame to (0,0,30,20)
, but quickly move back to original point.
why it went back?
why and how to solve this issue?
- (IBAction)onTransitButtonDidClick:(id)sender {
[UIView animateWithDuration:0.3
delay:0.0
options:UIViewAnimationCurveEaseInOut
animations:^{
[_rightView setFrame:CGRectMake(40,0,320,548)];
[_transitButton setFrame:CGRectMake(0,0,30,20];
}
completion:nil];
}