swift print
print("Hello World")
//printing a value
let num = 5
print(num)
print("a num: " + num) //concatenation
print("a num: \(num)") //interpolation
print("Hello World")
print("Hello Again")
//prints Hello World, and then Hello Again on a new line
//Hello World
//Hello Again
print("Hello World", terminator="")
print("Hello Again")
//prints Hello World and then Hello Again on the same line
//Hello WorldHello Again
print(123.45)
//prints 123.45
var message: String = "Hello"
print(message)
//prints Hellovar str1 = "Hello, world"
print(str1)
Also in Swift:
- change the title of a button using Swift
- changing color of background swift
- swift generate uuid
- receive notificationcenter data in swift
- swift enum
- swift change button text
- reverse list swift
- random string swift
- swift print struct name
- How do I check if a string contains another string in Swift
- connect old iphone with latest xcode 12 or 13
- UI API called on a background thread
- How to find index of list item in Swift?
- swift language compiler
- get hours difference between two dates swift
- swift and xcode and convert "Int to Int16"
- swift file size from url
- swift + data to string
- swift scrollview hide scrollbar
- activity indicator swiftui
- tableview cell animation swift
- weather api in ios swift 5
- uitableviewcell automatic height
- get device name swift