我试图在按下索引 0 时垂直翻译分段控件,以便 UITextView 可以出现在它的位置。我有 UITextView 工作的动画。
我试图从另一个stackoverflow线程实现以下代码。将 btnMyButton 替换为 mySegControl。
btnMyButton.frame = CGRectMake(oldx,oldy,width,height);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:btnMyButton];
[UIView setAnimationDuration:0.3];
btnMyButton.frame = CGRectMake(newx, newy, width, height);
[UIView commitAnimations];
更改时,[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:presentingComplaintSegCtrl];
给出以下警告:“语义问题类方法 '+setAnimationTransition:forView:' 未找到(返回类型默认为 'id')”
有没有更好的方法来解决这个问题?
注意:我在 XIB 中创建分段控件。
谢谢你