我有一个 UITableViewCell,我为它的内容设置动画。但我想限制动画,以便当文本超出 UITableViewCell 时,它在 ViewController 中不可见。
动画本身很简单:
[UIView animateWithDuration:0.3 delay:0 options:0 animations:^
{
yesNew.origin.x += 200;
noNew.origin.x += 200;
ansLblNew.origin.x = -210;
[yesButton setFrame:yesNew];
[noButton setFrame:noNew];
[answerLabel setFrame:ansLblNew];
}completion:^(BOOL finished){
[yesButton setHidden:YES];
[noButton setHidden:YES];
[answerLabel setHidden:YES];
}];