import Foundation
import UIKitclass 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: {}) }