one line if statement swift
let a = -5
// if the condition is true then doThis() gets called else doThat() gets called
a >= 0 ? doThis(): doThat()
func doThis() {
println("Do This")
}
func doThat() {
println("Do That")
}
Also in Swift:
- limit log file size swift
- how to change background color of stackview swift
- how to swift pie chart quartzcore framework
- IOS create UIAlertViewController programmatically
- set button programmatically swift
- swift add horizontal line uiview programmatically
- how to set the center in view in swift
- fnb swift code
- guard let swift
- swiftui font color
- swift temporary directory
- swift ns_enum generic name
- swift uitableview cell spacing
- remove child from firebase swift
- register for remote notifications swift
- Split a String into an array in Swift
- swift image button blue
- switch statements swift
- swift update uilabel text button
- How do I check if a string contains another string in Swift
- swift uitextfield only numbers keyboard lock programmatically
- print things in swift
- swift from 1 to 01
- swift switch