ios界面跳转

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: {})
    } 
上一篇:ios中的界面跳转方式


下一篇:安卓开发笔记(二十五):ViewPager的使用