当文本字段处于活动状态时,动画视图会被取消?

时间:2015-10-30 03:51:27

标签: ios uiview uitextfield swift2 uiviewanimation

我有一个UIViewController,它有UITableView,在UITableView上我在tableview单元格中选中按钮时动画UIView。在UIView中我有一个UITextField,现在当我点击文本字段时,UIView消失了。

我在Swift 2.0中这样做。有关此问题的任何建议,如果可能的话,还有一些解释/示例代码参考。

下面是我在UITableViewCell中选择按钮时正在进行的动画处理

if !cell.btnBuy.selected
    {
        UIView.animateWithDuration(0.5, delay: 0.1, options: UIViewAnimationOptions.CurveEaseIn, animations: {
            self.buyView.frame = CGRectMake(0.0, self.buyView.frame.origin.y - (56.0 + 64.0 + 43.0 + self.SearchBar.frame.origin.y + self.Segment.frame.origin.y), self.view.frame.size.width, 412.0)
            }) { (finished) -> Void in}
        UIView.commitAnimations()
    }

View after selecting button in tableview cell View after clicking on the textfield

感谢。

1 个答案:

答案 0 :(得分:0)

< pages buffer="true" validateRequest="true" enableViewState="false" enableEventValidation="false">
</pages>