【发布时间】:2016-07-20 05:55:24
【问题描述】:
当用户按下按钮时,我想让子视图隐藏为假。此子视图在设计时设置了 60% 的不透明度。子视图应该从按钮所在的位置开始以流畅的动画出现。
以下是我尝试过的代码:
@IBAction func moreOptions_Clicked(sender: AnyObject) { print("moreOptions clicked")
UIView.animateWithDuration(0.9, delay: 0.2, options: UIViewAnimationOptions.TransitionCurlDown, animations: {
//self.objMoreView.hidden = false
// Show view with animation
}, completion: nil)}
这没有奏效。有什么解决办法吗?
【问题讨论】:
-
试试
alpha = 0然后在完成时隐藏它?
标签: ios swift xcode animation uiviewanimation