导航控制器从右到左瞄准

时间:2017-06-24 15:28:22

标签: swift uinavigationcontroller persian

我需要以阿拉伯语/波斯语样式从右向左更改我的导航并更改后退按钮的位置,我需要完全反转我在堆栈溢出下面的代码下面找到的导航控制器系统但我有后退按钮的问题:< / p>

import UIKit
import QuartzCore

class SegueFromLeft: UIStoryboardSegue {

    override func perform() {
        let src: UIViewController = self.source
        let dst: UIViewController = self.destination
        let transition: CATransition = CATransition()
        let timeFunc : CAMediaTimingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
        transition.duration = 0.25
        transition.timingFunction = timeFunc
        transition.type = kCATransitionPush
        transition.subtype = kCATransitionFromLeft
        src.navigationController!.view.layer.add(transition, forKey: kCATransition)
        src.navigationController!.pushViewController(dst, animated: false)
    }

}

更新

后退按钮的问题是,我需要将后退按钮放在右侧,当您单击后退按钮时,它将从左到右导航视图控制器

0 个答案:

没有答案