0
我需要在xcode中提供一个滑动条来提醒用户他输入了错误的数据。 我希望它在屏幕的顶部出现约1秒钟,然后消失,所以用animcation东西并提交,我有这样的代码为它编写的,它还挺做这项工作,除了Facebook用户界面行为,iOS下滑imageview
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.3];
CGPoint center = self.slidingView.center;
center.y += self.slidingView.frame.size.height;
self.errorLabel.center = center;
self.slidingView.center = center;
self.slidingView.transform = CGAffineTransformMakeRotation(0);
[UIView commitAnimations];
[self.view bringSubviewToFront:self.slidingView];
[self.view bringSubviewToFront:self.errorLabel];
现在这个problrem是最初slidingview背后却隐藏着另一个的UIView,但我需要它只是滑下去,现在这出现在一个野蛮的方式(因为调用bringSubviewToFront的。
任何想法。
因为我想让它在它位于后面的控件后面滑动窗体,那么fronttofront调用只会将它移动到z索引处。 – Kalamantina
对。所以如果你在开始时将前面的子视图调用到前面,它不应该是震动的(因为滑动视图还没有完全出现) – Msencenb