Posts

Showing posts from August, 2020

Raywenderlich.com Table Views Course Part 3

 Third - and final - part! After this, I will do a consolidation entry, using the same concepts but different content - Harry Potter characters. I know this is repetitive, but I don't care as this blog is purely for me (ha!) but it will be really useful to apply what I learn on this course IMMEDIATELY afterwards. Another great thing with rw.com is that the courses are up to date! Mark's were around 3 years old, so I was conscious of how dated the content was. Anyway, Catie's course has been difficult to follow at times but well-explained throughout. When I do the consolidation, I will need to have her course at hand, rather than just plough through! As always, I will try it myself first before checking out her info. Anyway enough rambling! OK the first point in the intro is the delegates we're using are fine for an app that doesn't have interaction... but that's going to change! IOS 13 has brought out a new one - UITableViewDiffableDataSource. Nice! It sounds li...

Raywenderlich.com Table Views Course Part 2

 After a brief Staycay (one night away) I am back to continue with TableViews! I may possibly complete this course today. Putting the notes on A3 paper really works, with this more for stuff I just need to make sense of at the time - talking aloud if you will.  Let's recap what I made a note of on the A3 paper so far... What are they? Like fancy vertical stack views! TVs are filled with 'cells' The prototype cells are there to be used (built in the system) but you can also make custom ones The Table View Controller - use this rather than a TV if you the know the WHOLE screen is going to be a TV basically Properties 'Read me' - the project from Catie to work with Each TV is an instance of a TV class The one essential property is the DATA SOURCE. This is not a special type but it has to conform to a protocol. This protocol has two methods: 1) number of rows in section, 2) cell for row at index path 1) Is easy - it is just an Int - a number to be returned. 2) Is more c...

Raywenderlich.com Table Views Course Part 1

So you could say, reorientation complete! Having gone through the Coursera stuff (must cancel that subscription actually) I feel like I've got most of the essentials again. Of course there are elements that I haven't gone over e.g. protocols but all in good time! I'm proud because in a couple of weeks, I've managed to make two mini apps (very, very basic) that actually work! Most importantly, I'm back coding and will make time, even when back at work.  Another idea is to start mapping out on A3 paper some of the key content from each course. It would save as a useful memory aid - on here, the information is gone once the blog is complete. This is more just an overall record and to help make sense of something. So one A3 paper per course, and one overall A3 paper (maybe more, in time) to just track what I'm doing VISUALLY. We'll see! And after all the Coursera  hype, I'm back to raywenderlich.com! Starting with table views... This is from Catie Catterwaul...

*Consolidation Entry* 2nd Basic App Part 2

The second and final part of my 'suntanning' app! A key, KEY thing to remember here is that I'm simply trying to replicate the functionality in Mark Price's project for the wage/hour thing. The actual suntanning number is irrelevant at this stage, so are other lofty ambitions of using APIs to get actual temperature from actual cities - that can easily be looked at another time. Here is all I want to achieve today: Getting 'clear calculator' button and function to work Making sure typing onto the labels is slick and works ok etc Add in minutes and hours to the results label - calculate function needs overhaul  Attempt to do enum for skin type, then factoring that into calculations! The last one is the hardest by far; again if I can't do it at this stage, then that's totally fine! Clear calculator - doing this without any help at all.  Done! Done it as a separate function and put that into the button body, but didn't actually really need to.  OK, the t...

*Consolidation Entry* 2nd Basic App Part 1

Having finished the second Coursera course and not feeling remotely inclined to go through another of the dated and, frankly, not-well-structured content, it's time to consolidate! Then I'm back with what I paid an annual subscription on - raywenderlich.com. The point of this is to a) put into practice the elements of @IBDesignable and the calculation/display element of things from Mark's course, b) do something I actually want to see on an app - the suntan idea and c) get more versed with Storyboard. SwiftUI is neat and whizzy but it's important to know the old interface. As always, here is my list of what to do... Get the background image, use image resizer and add to the assets For the view, get the UITextFields and get all of the layout sorted, with constraints Get the @IBDesignable class, specifically for the UITextField bits Get the functions to calculate and display what is needed All the other bits and pieces! This looks like several hours worth, at least. But t...

Coursera - Intro to IOS Development Part 3

Here we go - a quick session while away on a Staycation in RAK! Continuing with Mark's somewhat pointless (sorry, that is really harsh...) course, let's see what I can get done in 20 minutes... Unit Tests So this is something I have never seen before! You need to be on the main file of the app, go to editor and add in unit testing. Then you can test out specific functions or other calculations etc.  So why, what's the point of unit testing? Right, so the general reason is if someone else e.g. a co-developer is working on your code with you. If they have then changed something, then the unit testing will not work. So one of the main reasons is to protect you from that.  To be honest, I think it's quite a cool thing to test anyway but with SwiftUI and the 'live' preview of what is on the screen, it's more for the co-development than anything else. If you have a failed unit test, NEVER ship the code! OK back a day later - ambitious to get much done while on a S...

Coursera - Intro to IOS Development Part 2

After doing the much-needed consolidation entry for my 'basic' app, I feel like I strengthened my understanding of various concepts: General use of Xcode including VCs and Storyboard etc Assets and using the 1x, 2x and 3x Use of the button style custom struct A custom struct for specific info (Buffy Characters) Multiple VCs and successful segues! Random function within arrays (something I have admittedly done quite a lot before) Constraints, alignment, style etc. with images, buttons, labels So lots of useful stuff! Now I've done that, I'm ready to tackle 'Week 2', which I will do some of now and more later.  Supporting iOS on iPhone and iPad This is not just having the same layout on each, but having an adaptive approach.  Mark has done something with terminal and git but I don't get it - I tried accessing mine but not working - must be to do with where it is saved etc. Mark recommends this so something to look at another time! I think I know where this is ...