fileprivate func hideViewWithAnimation() {
UIView.animate(withDuration: 0.3, animations: { [weak self]
if self == nil {
return
}
self!.view.backgroundColor = UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0)
self!.constraintContainerViewBottom.constant = -Constants.screenHeight()
self!.constraintContainerViewTop.constant = Constants.screenHeight()
self!.view.layoutIfNeeded()
}, completion: { (isCompleted) in
self.navigationController?.dismiss(animated: false, completion: nil)
})
}
有一個錯誤顯示[weak self]要求使用','分隔它。我在做什麼錯[weak self]給出以下代碼的錯誤:預期','分隔符
''[weak self] in',你沒有'in' – Tj3n