如何使用Swift在UITabbar first item上添加自定义标签

时间:2019-06-26 09:35:43

标签: swift

我的情况是,我需要在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
    }

0 个答案:

没有答案