简体   繁体   English

XIV 6 Beta 5中的UIView.animateWithDuration更改

[英]UIView.animateWithDuration change in Xcode 6 Beta 5

I am trying to animate a change in dimension for a UITableView. 我试图为UITableView的维度更改设置动画。 The following code worked in beta 4: 以下代码适用于测试版4:

     UIView.animateWithDuration(0.1, animations: {
                tableView.frame = CGRectMake(tableView.frame.origin.x, 0 - self.calcTopOffsetToCell(indexPath), tableView.frame.size.width, tableView.frame.size.height + 190)
            }, completion: { (finished: Bool) in
                self.selectedIndex = indexPath
                cell.amountTextfield.becomeFirstResponder()
            })

In beta 5, I get the error "Missing argument for parameter 'delay' in call" 在测试版5中,我收到错误“调用中缺少参数'延迟'的参数”

If I change the function to specify the delay: 如果我更改函数以指定延迟:

UIView.animateWithDuration(0.5, delay: Double(0), options: .CurveLinear, animations: {
            tableView.frame = CGRectMake(tableView.frame.origin.x, 0 - self.calcTopOffsetToCell(indexPath), tableView.frame.size.width, tableView.frame.size.height + 190)
            }, completion: {
                (finished: Bool) in
                self.selectedIndex = indexPath
                cell.amountTextfield.becomeFirstResponder()
        });

I get the error "Extra argument 'delay' in call" 我在调用中得到错误“额外参数'延迟'

Not sure if I'm doing something wrong or this is a bug. 不确定我做错了什么或这是一个错误。 Any ideas? 有任何想法吗?

Even if I used the most basic syntax: 即使我使用了最基本的语法:

UIView.animateWithDuration(0.5, animations: {
            tableView.frame = CGRectMake(tableView.frame.origin.x, 0 - self.calcTopOffsetToCell(indexPath), tableView.frame.size.width, tableView.frame.size.height + 190)

        })

I get the "Missing argument for parameter 'delay' in call" error 我在调用中得到“参数'延迟'的缺失参数”错误

似乎错误实际上与calcTopOffsetToCell()没有返回CGFloat并且IDE错误不正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM