1.ViewController.swift
import UIKit
class ViewController: UIViewController {
let textField = UITextField()
let button = UIButton()
override func viewDidLoad() {
super.viewDidLoad()
textField.frame = CGRectMake(20, 20, 100, 50)
textField.textColor = UIColor.blueColor()
textField.placeholder = "Input:"
button.frame = CGRectMake(0, 55, 50, 50)
button.backgroundColor = UIColor.blackColor()
button.setTitle("UP", forState: UIControlState.Normal)
button.addTarget(self, action: "jump", forControlEvents: UIControlEvents.TouchUpInside)
self.view.addSubview(button)
self.view.addSubview(textField)
}
func jump(){
let viewController = NextViewController()
//传递数据
viewController.labelContent = textField.text!
presentViewController(viewController, a