我的问题很简单,但我找不到答案...
我有一个标签栏,我试图在视图上方添加视图以获取自定义segue动画,但是由于某种原因,当我插入Subview时,该子视图添加在标签栏层之后,而不是在AddPod
视图之后的标签栏层中:
这是示例:
override func perform() {
let sourceView = self.source.view as UIView
let destinationView = self.destination.view as UIView
destinationView.frame.origin.y = -destinationView.frame.size.height
let window = UIApplication.shared.delegate?.window!
window?.insertSubview(destinationView, aboveSubview: sourceView)
UIView.animate(withDuration: 1, animations: {
destinationView.frame.origin.y = 0
}, completion: {
(value: Bool) in
self.source.tabBarController?.present(self.destination, animated: false, completion: nil)
})
}