我的情况是,我需要在UITabbar的第一项中心位置上添加一个自定义标签,因为基于标签中心位置,我将在其上应用圆弧过渡起点。
下面的我的代码
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .present
transition.startingPoint = customLabel.center // here I need to get custom label center position
return transition
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
transition.transitionMode = .dismiss
transition.startingPoint = customLabel.center
return transition
}