Posts

Showing posts with the label timer

*Xcode Project Entry 3* Times Tables Quiz - Part 5

This is cheating....a little! The day after my last entry, I managed to fix and completely sort out the app! I spent a good hour or so on it, changing the code so that the pop ups came up for the end of the timer. What a feeling it was to sort it all out! One of the issues was not having all outlets connected and having some bogus ones, which I removed. That helped. This bit I commented out as it made no difference: // //    func hideKeyboard() { //        textFieldDisplay.resignFirstResponder() //    } // //    func textFieldShouldReturn(_ textField: UITextField) -> Bool { //        textFieldDisplay.resignFirstResponder() //        return true //    } I'm not entirely convinced that I need the keyboard code at all...let's see! Actually no real other code there other than the UITextFieldDelegate is conformed to (for the textbox).  So here's what we ...

*Xcode Project Entry 3* Times Tables Quiz - Part 4

Image
11 days! 11 days?! That is a seriously poor effort. It may be a reflection on the fact that I have been doing more exercise lately - gym, tennis and yoga but even then...not good at all! It's nothing to worry about though! Another factor is that last time, I failed to get a times table generator working. So that's what I need to achieve first. I will spend half an hour or so trying to figure it out, if not then I will have to find one online, which is no shame! Anyway, let's just move on and accept that a week and a half is gone but from now on we're getting the time back in! Start Time - 13:44 So like I said, let's revisit that times tables generator... Ok, I've got the random numbers and what the answer should be returned as - in separate functions. I've also connected all of the outlets -    @IBOutlet weak var questionLabel: UILabel !          @IBOutlet weak var timerDisplay: UILabel !          @IBAc...

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

So great progress last time! I got to the point where I need to work on a couple of key things - getting a way to type in the answer is the first priority. One option is to try to add in the return key, this could sort out the issue with using text field. IF NOT, then I will have to add the buttons separately. Then find a way of linking those to a label display...easier said than done! Start Time - 20:16 First thing's first, let's try out the return key option.... OK tried a couple of things on Stack Overflow but not clear. Now trying this: https://www.youtube.com/watch?v=bhp08NX4Pe4 So I've followed various steps but the app is taking an AGE to load. This is not a good sign obviously! From the tutorial:      func hideKeyboard() {         textFieldDisplay . resignFirstResponder ()              }     func textFieldShouldReturn( _ textField: UITextField ) -> Bool {   ...