Hacking with Swift — Learning Project 35 Random Numbers Setting up Create a new iOS playground and call it “Random Numbers”. Save it somewhere sensible. Generating random numbers without GameplayKit This is how modern Swift (post 4.2) manages it: Old-fashioned randomness The arc4random() function returns numbers between 0 and 4.294.967.295 … To generate a randomContinue reading “Learning Swift — Day 150 to 151”
Tag Archives: Technique
Learning Swift — Days 111-113
Review of the Swift Programming Language Day 111 Repeat-while loops Conditional Statements If (in case conditions are not complete, no action will be taken and this is fine) Switch (this has to be exhaustive instead) No Implicit Fallthrough Tuples: when using tuples inside switch blocks we can use the wildcard pattern (_ in place ofContinue reading “Learning Swift — Days 111-113”
Learning Swift — Day 104
Hacking with Swift — Learning Project 30 This project will be about learning how to use Instruments for the first time and to debug performance issues. Let’s dive in. Setting up Today we are going to learn about profiling. Profiling is the term used when we monitor performance, memory usage and other information of anContinue reading “Learning Swift — Day 104”
100 Days of Swift – Day 92
New day, new journey! Today is the turn of a technique project! I was in a big hurry yesterday and today is not looking any better. It is 2.35pm as I’m starting to write this entry in the diary-blog and I feel as if everything is tremendously late! Reflections on Day 91 Yesterday’s project wasContinue reading “100 Days of Swift – Day 92”
100 Days of Swift – Day 87
Hacking with Swift – Learning Project 24 Setting up Create a new playground and name it “Swift Strings”. Yes, that’s it to get started, all the why and what are here and I don’t want to repeat other people’s words! Strings are not arrays In this very informative video we learn that, in Swift, stringsContinue reading “100 Days of Swift – Day 87”
