if statement swfit
// if expression {
// do something
// }
var a: Int = 3
if a == 3 {
print("Hello World")
} else if a < 3 {
print("dlroW olleH")
} else {
print("42")
}
Also in Swift:
- get device height spritekit
- guard let swift
- register for remote notifications swift
- swift how to add a completion block to a function
- swift close app
- parsing to double any data type in swift
- swift sort array
- enum from raw value swift
- print things in swift
- set button programmatically swift
- swift dispatch after
- swift temporary directory
- swift uitableview insert cell
- swift uitableview cell spacing
- swift writing to ios logs
- .next() enum swift
- xcode how to know which textfield is selected
- swift open url
- Split a String into an array in Swift
- uilabel font size swift
- swift switch
- how to show notification icon on tabbar item swift
- swift out of bound elelemnt
- swift check if regex is in string