//1.添加返回按钮

    func addBackBtn(){

       let leftBtn:UIBarButtonItem=UIBarButtonItem(title: "返回", style: UIBarButtonItemStyle.Plain, target: self, action: "actionBack")

        leftBtn.title="返回";

        leftBtn.tintColor=UIColor.whiteColor();

        self.navigationItem.leftBarButtonItem=leftBtn;

    }

    //返回按钮事件

    func actionBack(){

        self.navigationController?.popToRootViewControllerAnimated(true);

    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案