let button = UIButton() : button.setTitle("Tap Me!", forState: .Normal) : button.setTitleColor(UIColor.redColor(), forState: .Highlighted) : button.addTarget(self, action: "tapped:", forControlEvents:.TouchUpInside)

nilabnilab のブックマーク 2015/12/22 09:50

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

UIButtonを動的に作るサンプルコード - Qiita

    ほとんどのアプリで必ず使われるUIButtonですが、swiftでの基的な使い方を見て行きたいと思います。 let button = UIButton() //表示されるテキスト button.setTitle("Tap Me!", forState: .Normal) //テキスト...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう