Posts

Showing posts from July, 2020

*Consolidation Entry* Basic App 2

Just a quick addition to the 'basic' Buffy app I made. This is purely to show some other functionality and avoid the whole connecting each button to a separate view issue. It also will add the 'random' element.  Basically, rather than a character coming up with the appropriate button, I want a 'random' character selection. This can be broken down to regulars, guest stars and one offs, thinking about it. Neat! The random element will use the Int.random method, with arrays created of each character, using the buffyCharacter struct. You seem, I'm talking more like a coder! I don't know if I can 'save as' so I don't lose the option of what I already have... No, apparently not but no bother. It would be easy to get this back to that anyway. So I'm going to create an example just with another character to see if that works.  Got it working! Nowhere near as simple and actually couldn't just put all of the characters into an array into a stru...

*Consolidation Entry* Basic App 1

Calling this 'Basic App' as it is literally to go through similar processes to the Mark Price project in Week 1. In order to approach any app it is IMPERATIVE to be organised and not even begin to code until the pieces are in place. So here is what I need to do: Get relevant pictures (Buffy) and put them through the resizer program Get those assets added in Set up VC with main storyboard Get other VCs set up on storyboard and have each of them named, then added with the correct name in Model for Buffy character names *It's important to add in here that the purpose of this app is a very, very simple one to show bios on Buffy's main characters. It could branch out from there, but for now it's just going to be a few key screens.  Also need: Function for displaying info Segues And that's about it! So will start with the storyboards having added assets... Well it's been a productive hour or so! This is more about the view than model or controller. I've made t...

Coursera - Intro to IOS Development Part 1

I'm back! A few days away after doing the basics course, now going to dive into a new one. Got plenty of time so will do quite a bit today.  Intro A note here that there will be older Xcode versions in use. Xcode 10/11 - evolution of finding objects/buttons etc.  So the 'first app' is a button changing colour. Simple stuff and using the storyboard with view controller match up. This is before SwiftUI came in. So the 'older' way of doing it.  Xcode Features A bit from a website to read -  https://developer.apple.com/xcode/ We're now up to Xcode 12! Key points from this article: Layout features makes it more user friendly - tabs, views etc SwiftUI - better for APIs, Widgets... more universal code etc. A brief overview to be honest. Welcome Screen Sometimes he is Mark Price, sometimes Mark Wahlbeck.  When creating the new project, I just remembered there's the option to select either Storyboard or SwiftUI. So this is back in the Storyboard as the only option da...

Coursera Introduction to Programming in Swift - Part 4

On a real roll now, yeah! I'm several weeks 'ahead of schedule', which is fine as this was very much a refresher for me.  Object Oriented Programming My understanding of this is the use of classes to then create objects, which you then essentially do the code with. Yes, a blueprint - having multiple copies so we're looking into inheritance.  A good point he makes is you need to THINK in OOP. Those with design backgrounds take to this more easily than those who think with numbers etc. I'm a real mishmash on that one! It's about thinking of the world in objects, then thinking of what properties they have and what they can do (methods/functions).  Instances/Objects - that's a debate I remember from before. Isn't an instance of a value type e.g. a struct? Maybe not. Instantiating - creating an instance from the class. Pass by reference - where a constant object can be changed. You cannot copy an object. OK, in that example, you can put the OBJECT into the pa...

Coursera Introduction to Programming in Swift - Part 3

The momentum continues! Again, no need to get too excited - this is all recap, and easy recap at that. Still, it is necessary to do so. With Coursera, I will see what the rest of the content is like before deciding to sign up for another month or not. I still have a few months with RayWenderlich.com too.  Dictionaries Another collection type - unordered unlike arrays with the key-value pair business.  Subscript - square brackets. Adding elements, clearing it - all the usual functionality. Using a for loop and tuple together - a good way to look through a dict for info. Using .keys and .values after the dictionary allows you to access each of those. Apparently when using JSON, you will be grabbing data from keys and values. Examples of getting info from JSON from Star Wars and Pokemon.  Challenge - one question as usual. I misread this before as 5 questions when it was a '5 minute' challenge. Of course it's not 5 minutes but that makes more sense now! Now onto the playgrou...

Coursera Introduction to Programming in Swift - Part 2

First off, sorry to Coursera for putting the extra letter in the name - managed to bungle that! Here we go with part 2 - a quick entry here, just to focus on whatever is next.  Right this bit is from Mark Price - from Devslopes which is the company I've seen him from before. Will probably be a lot of recap: Bools and Conditionals. Booleans and Conditional Logic A lot of waffle here so far - sorry Mark Price! For a newbie, then fair enough but I know this stuff. Good that it is very familiar and just sacrosanct information at this point.  More practical uses - if something has e.g. downloaded - then it can have a Bool - a true/false.  All of the less than, greater than etc. etc.  If statements - using greater than or less than, then the print statement. With Ints, with Strings etc. etc.  Straight onto the review. No point messing around! Review and challenges done - all good.  A good time to stop - will continue the next bit of logic etc. later.  OK, I'...

Courserea Intro to Programming in Swift - Part 1

So in typical style, I had no time to code for several days! Now I'm finally making a proper start with the Courserea one that I have signed up to. As I mentioned before, the purpose of this blog will be more to write out my 'live' understanding and thoughts about the content, rather than just regurgitating what is there.  Downloading Xcode All updated - good to go! Hello Swift This is the classic - simple beginning. Things taking a while to actually run and come up on Xcode. No bother for now. It looks like there will be exercises that go alongside this course, cool! From learning before, I NEED the challenges to keep my understanding sharp.  Challenge So now the first challenge has come up. Cool - nice and easy of course at this stage.  Variables As mentioned already a few times, this a lot of refreshing. Consolidation really.  Different types introduced - String, Int, Double, Bool etc.  Ram - creation of variables takes up ram - memory essentially.  Cons...

*First Blog* Starting Points and Summary

Here we are! A new blog and a fresh start. It's always exciting at the beginning of something, whether it's a relationship, a film...visiting a new place in the world. Anything really! One always has that optimism and sense of adventure.  In truth, this is not so much the start but a continuation. My last blog (Josh's Swift Journey - https://www.blogger.com/blog/posts/756758691918297531) had to be curtailed as I was unable to code during 'Learning From Home' - the lockdown period for teachers. With that much screen time per day, it was not feasible to get in any Swift time at all. When I opened the, now, old blog, I saw that I hadn't coded for four months. That's a hell of a long time! So, as I've said a chance to start afresh, anew... It is important to remember that I did learn lots of useful elements of Swift before and no doubt, those will be back again at some point. At the same time, I have fresh eyes and mind and really need to start thinking bigg...