In today's Swift tutorial I discuss various ways to use .random and .shuffle that was introduced in Swift 4.2. I'll show you how to get random numbers like Int, Double and Float as well has how to get a random boolean value. I also discuss how to get a random element from an array as well as how to shuffle an array.
This tutorial was created on a playground using Xcode 11.3 and Swift 5.1.
If you like my teaching style, I've released my first iOS dev course which is all about the take-home project job interview for iOS developers.
Course Info - [ Ссылка ]
Link to my book - How I Became an iOS Developer:
[ Ссылка ]
Hired.com:
[ Ссылка ]
Check out my podcast, iOS Dev Discussions:
[ Ссылка ]
Are you a gamer? I'm streaming video games on Twitch:
twitch.tv/seanallen
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Ray Wenderlich Books:
[ Ссылка ]
Ray Wenderlich Videos:
[ Ссылка ]
Paul Hudson's Hacking With Swift:
[ Ссылка ]
Learn Advanced Swift Here:
[ Ссылка ]
Links to my iOS Dev Setup & iOS Dev Book Recommendations
[ Ссылка ]
Personal Links:
Twitter:
[ Ссылка ]
Instagram:
@seanallen_dev
#swift #softwaredeveloper #iosdeveloper
How to use Random and Shuffle in Swift
Теги
SwiftSwift TutorialiOS DeveloperiOS DevelopmentSwift Code TutorialSwift app tutorialswift random numberswift random number generatorswift randomize arrayhow to get a random number in swiftrandom swiftswift randomswift shuffleswift shuffle array functionshuffle array swiftswift array random elementhow to get a random element from an array swiftrandom number in swiftSean AllenSwift functions