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 { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let alert:UIAlertController = UIAlertController(title:"Swiftアラートテスト2", | |
message: "アラートのテストです。", |
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 Test1AlertViewController: ViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let alert:UIAlertController = UIAlertController(title:"Swiftアラートテスト", | |
message: "テスト原稿をします。", | |
preferredStyle: UIAlertControllerStyle.ActionSheet) |
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 | |
import Social | |
class ViewController: UIViewController { | |
var myComposeView : SLComposeViewController! | |
var myTwitterButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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 | |
import Social | |
class ViewController: UIViewController { | |
var myComposeView : SLComposeViewController! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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 { | |
override func viewDidLoad() { | |
// Labelを生成する。 | |
var label = UILabel() // labelはUILabelであると定義する | |
label.frame = CGRectMake(0,0,200,50) // Labelの大きさ | |
label.textAlignment = NSTextAlignment.Center // 定義する座標はlabelの中心座標であることを定義する |
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 { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//AppDelegateのインスタンスを取得 | |
var appDelegate:AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate | |
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 | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
// ここに共通変数をして登録する | |
var a = 0 | |
var b: String? |