Swift - Snippets: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 11: Zeile 11:
 
  [[Swift - delay code execution]]
 
  [[Swift - delay code execution]]
  
 +
== Sound ==
 +
[[Swift - Play a Sound]]
 
== Gestures and Motions ==
 
== Gestures and Motions ==
 
  [[Swift - Shake Motion]]
 
  [[Swift - Shake Motion]]

Version vom 29. Dezember 2022, 18:39 Uhr

Links

Swift (Programmiersprache)
https://www.swift.org/

Random

let score = Int.random(in: 1...10)
let rating = Int.random(in: 1..<10)
let floatNumber = Float.random(in: 1...10)
let bool = Bool.random(in: 1...10)

Time

Swift - delay code execution

Sound

Swift - Play a Sound

Gestures and Motions

Swift - Shake Motion