【发布时间】:2012-06-08 13:21:15
【问题描述】:
我试图在按下索引 0 时垂直翻译分段控件,以便 UITextView 可以出现在它的位置。我有 UITextView 工作的动画。
我尝试从this 其他stackoverflow 线程实现以下代码。随着 btnMyButton 被替换为 我的SegControl。
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 中创建分段控件。
谢谢
【问题讨论】:
标签: objective-c ios ios5 uisegmentedcontrol uianimation