Created
June 11, 2014 17:58
-
-
Save jazzsasori/8681057d137507bb91aa to your computer and use it in GitHub Desktop.
swiftでIBOutlet, IBAction ref: http://qiita.com/jazzsasori/items/6053e1467772b7ff9783
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet var button:UIButton | |
@IBAction func buttonTapped(sender:AnyObject) { | |
var tappedButton:UIButton = sender as UIButton | |
tappedButton.setTitle("tapped", forState:UIControlState.Normal) | |
} | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
button.setTitle("tap me", forState:UIControlState.Normal) | |
} | |
override func didReceiveMemoryWarning() { | |
super.didReceiveMemoryWarning() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment