ios界面跳转

时间:2023-03-08 16:05:25

import Foundation
import UIKit

class MyViewController: UIViewController{
// var window: UIWindow?
override func viewDidLoad() {
super.viewDidLoad()

self.title="我的";
self.viewCJWT.userInteractionEnabled = true
self.viewCJWT.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "imagePathClick:"))
}

@IBOutlet var viewCJWT:UIView!
@IBOutlet weak var b:UIButton?

/* @IBAction func ViewCJWTaction(sender: AnyObject){
var myviewcontronller=ChangjwtController()
var a=UINavigationController(rootViewController: myviewcontronller)
self.presentViewController(a,animated:true,completion:nil)
}*/

func imagePathClick(sender: AnyObject){
self.presentViewController(ChangjwtController(), animated: true, completion: {})
}
}

取消代码

 @IBAction func OnBackup(sender: AnyObject) {
        self.dismissViewControllerAnimated(true, completion: {})
    }