★ Int
let code = 1001
switch code {
case 200:
print("Success")
case 300, 301, 302:
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var bottomLayout: NSLayoutConstraint! | |
let notificationCenter = NSNotificationCenter.defaultCenter() | |
override func viewDidLoad() { | |
super.viewDidLoad() |
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var bottomLayout: NSLayoutConstraint! | |
let notificationCenter = NSNotificationCenter.defaultCenter() | |
override func viewDidLoad() { | |
super.viewDidLoad() |
// Int | |
extension Int { | |
func repeatFunc(task: () -> ()) { | |
for _ in 0..<self { | |
task() | |
} | |
} | |
} |
// 現在のファイル名 | |
__FILE__ | |
//=> /Users/******/Desktop/Swift_Practice/Swift_Practice/ | |
// 現在の行数 | |
__LINE__ | |
// 現在のカラム数 | |
__COLUMN__ |