将方法从目标c转换为swift

时间:2016-03-14 20:08:18

标签: ios objective-c swift

大家好我怎样才能将此代码转换为swift。

 (id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
                                   animationControllerForOperation:(UINavigationControllerOperation)operation
                                                fromViewController:(UIViewController *)fromVC
                                                  toViewController:(UIViewController *)toVC
{
}

我一直想弄清楚,但不能。

提前致谢 雅利安

1 个答案:

答案 0 :(得分:2)

Apple already did that为你:

func navigationController(_ navigationController: UINavigationController,
   animationControllerForOperation operation: UINavigationControllerOperation,
                fromViewController fromVC: UIViewController,
                  toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
{
}