Skip to content

Instantly share code, notes, and snippets.

View NoasProject's full-sized avatar

:N NoasProject

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