Posts

Showing posts with the label arc4random

Sandra L Course Part 3 (lectures 16 to 22)

Image
Well it's been a good few days! After so much success with my first proper app, it's been a shame not to capitalise on that. Having said that, I do feel recharged and ready to learn some more! My plan with Sandra's course is to keep with it for all of the recap. When it starts getting trickier, I'm going to work on an Xcode project for another app idea - got a few possibilities! So, let's continue with Sandra's course! Start Time - 13:29 Parameter Labels func add(number1: Int , number2: Int ) -> Int {          return number1 + number2 } add (number1: 4 , number2: 6 ) Again, easy stuff. The next step here is to use _ to have empty parameter labels.  OK - one useful distinction here between parameters and arguments. The argument is the external name - the one used outside of the code block. The argument label should read as a sentence e.g. using 'to' instead of 'name' in a sayHello function.  So "say hel...

*Xcode Project Entry* Letters in a Word - Part 2

Image
Yes, I'm back to it! Last time in this project, I barely got started as I was figuring out the new layout - mostly where new labels were kept! It's a bit simpler sure, but I didn't see what was wrong with the old one. Something I have learned with Xcode and Swift is that there is no point yearning for a previous feature - it moves on rapidly! Start Time - 15:20 So, using last time's 'to do list', here's a reminder of what I need to focus on: On the view of the app Label to display random words A number pad to type in answer for how many letters are in the word A timer - from 5 seconds to 0 each time A scoring system for tracking Scoring system to link to timer (potentially!) The model (code) of the app An array of words - this is easy enough; can be updated too! A randomising way so a different word is displayed each time Functions to calculate the score each time and total score Functions to update question number etc Function for the ac...