Updating Own Project To SwiftUI (HowManyLetters?) - Part 2
It's been a good week for coding! Another hour today and I'll be smashing my targets! A positive if frustrating session before; I ended up adding a bit more after finishing the last blog, so the app has evolved a little since then. I fell into a hurdle after moving around the button with one of the labels - couldn't figure out why so put things back again. Anyway, today, the focus is on trying to fix that final bit of the view, then creating the Model, then the Controller - well at least half of the latter!
Start Time - 18:28
Right, fixed! That was easy - seemed to play ball or maybe me being less tired helped!
Now for the Model - the word list....
Paused at 18:48; resumed at 19:14
Model done! I completely sorted that so have clearly moved forward with the whole object/instance thing.
Working on controller parts now. Getting a new word is not working when the button is clicked...need to find out why!
Abandoned at 19:51
(Total time approx 1 hour).
Well that was frustrating! The whole thing is flawed because I can't conform to the UITextFieldDelegate protocol, which means there is no way of editing the text box. Without being able to do that, it essentially means that I cannot interact with the number of words, so it makes the whole thing pointless.
Not a total waste of time though! In the past couple of hours I've learned about various things, which has been positive -
Use of ZStack - this supersedes H and V; it is good for changing colour of the whole background
Specifying the value of the spacer
Use of the model and creating an object from it, which was accessed!
Other types of padding - all four sides
Creation of buttons and labels - easy
All of this was good practice! So back to one of Ray's courses so I can learn more about Swift UI...
Start Time - 18:28
Right, fixed! That was easy - seemed to play ball or maybe me being less tired helped!
Now for the Model - the word list....
Paused at 18:48; resumed at 19:14
Model done! I completely sorted that so have clearly moved forward with the whole object/instance thing.
Working on controller parts now. Getting a new word is not working when the button is clicked...need to find out why!
Abandoned at 19:51
(Total time approx 1 hour).
Well that was frustrating! The whole thing is flawed because I can't conform to the UITextFieldDelegate protocol, which means there is no way of editing the text box. Without being able to do that, it essentially means that I cannot interact with the number of words, so it makes the whole thing pointless.
Not a total waste of time though! In the past couple of hours I've learned about various things, which has been positive -
Use of ZStack - this supersedes H and V; it is good for changing colour of the whole background
Specifying the value of the spacer
Use of the model and creating an object from it, which was accessed!
Other types of padding - all four sides
Creation of buttons and labels - easy
All of this was good practice! So back to one of Ray's courses so I can learn more about Swift UI...
Comments
Post a Comment