let alertTitleStr = "alert title" let alertMessageStr = "alert message" let actionStr = "action" let cancelStr = "cancel" let destructiveStr = "destructive" let alert = UIAlertController(title: alertTitleStr, message: alertMessageStr, preferredStyle: .alert) alert.addAction(UIAlertAction(title: actionStr, style: .default, handler: { UIAlertAction in print(actionStr) })) alert.addAction(UIAlertAc..
let number = 300 switch number { case 100 : print("백", "number = \(number)", separator: ", ") case 200 : print("이백", "number = \(number)", separator: ", ") case 300 : print("삼백", "number = \(number)", separator: ", ") case 400 : print("사백", "number = \(number)", separator: ", ") case 500 : print("오백", "number = \(number)", separator: ", ") case 600, 700, 800, 900 : print("육백, 칠백, 팔백, 구백", "numbe..
enum characters : Character { case a = "A" // a, raw value : A case b = "B" // b, raw value : B case c = "C" // c, raw value : C case d // error : Enum cases require explicit raw values when the raw type is not expressible by integer or string literal } enum strings : String { case a = "A" // a, raw value : A case b // b, raw value : b case c = "C" // c, raw value : C }
run command + r add editor on right control + command + t
// closure - sort import UIKit var sports = ["foot ball", "tenis", "table tenis", "wrestle", "base ball"] sports.sort { $0 $1 } print(sports) // result : ["wrestle", "tenis", "table tenis", "foot ball", "base ball"] sports.sort (by : { $0 < $1 }) print(sports) // result : ["base ball..
// enum - 1 enum numbers001 { case one // one case two // two case three // three } var number001 : numbers001 = .one print(number001) // result : one var number002 : numbers001 = .two print(number002) // result : two var number003 : numbers001 = .three print(number003) // result : three // enum - 2 enum numbers002 { case four, five, six } var number004 : numbers002 = .four print(number004) // r..
enum numbers001 : Int { case zero // 0 case one // 1 case two // 2 } var number000 : numbers001 = .zero print(number000) // result : zero var number000Int = number000.rawValue print(number000Int) // result : 0 var number001 : numbers001 = .one print(number001) // result : one var number001Int = number001.rawValue print(number001Int) // result : 1 var number002 : numbers001 = .two print(number002..
Deployment Info - Main Interface
let a = 100 let b = 200 func plus (num001 : Int, num002 : Int) -> (Int) { return (num001 + num002) } func minus (_ num001 : Int, _ num002 : Int) -> (Int) { return (num001 - num002) } func multiply (_ num001 : Int, _ num002 : Int) -> (Int) { return (num001 * num002) } var inputButtonType = "+" if inputButtonType == "+" { print("result", plus(num001: a, num002: b)) } else if inputButtonType == "-"..
let a = 100 let b = 200 func plus (num001 : Int, num002 : Int) -> (String, Int) { return ("result is", num001 + num002) } let result001 = plus(num001: a, num002: b) print(result001) // result : ("result is", 300) print(result001.0) // result : result is print(result001.1) // result : 300 func minus (_ num001 : Int, _ num002 : Int) -> (String, Int) { return ("result is", num001 - num002) } let re..
- Total
- Today
- Yesterday
- kotlin
- new project
- custom web view
- screenorientation
- create project
- Android
- 안드로이드
- check permissions
- 영문 키보드
- andorid
- simpleName
- javaClass
- 코틀린
- 로그캣
- permissions
- 화면 고정
- create new project
- android studio
- 화면 방향 고정
- StringWriter
- logtag
- logcat
- web view settings
- Inputmode
- web view
- defaultInputmode
- 클래스 이름
- web chrome view
- 외부 브라우저
- 웹뷰
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |