Posts

Showing posts with the label stack views

RayWenderlich.com Layout in IOS Course - Part 5

Image
It's been a while but for god reason! I've got a promotion at work, which means I've really got my future set. However, I am not going to abandon Swift. My work over the past 20-ish months has been rewarding and to let all of that go would be a shame. True, had I not got the promotion, I would probably be gravitating towards Swift more with an aim to transition to a career in the future. Anyway, that COULD still happen but it does make me want to rethink my goals a bit. We're also on an early holiday, so plenty of time to code and do a reflective entry of where I am and where I want to be. That will happen soon! For now, let's get on with the auto layout course! Start Time - 9:42 Intrinsic Content Size So this is the size that will fit EXACTLY into a a view's content. Content Hugging and Compression Resistance - these are rules that show the importance of contents not shrinking or resizing, bigger than the intrinsic size. 4 priority values to set. Vert...

RayWenderlich.com Layout in IOS Course - Part 4

Image
Here we go! So the course is split into Swift UKit. Interface builder. Let's do this! Start Time - 20:32 Introduction About half an hour tonight I reckon. Translates masks into constraints - apparently this is the option to use. So the whole point of Auto Layout is so you can fit onto any device. Stack views are coming here too. Autoresizing Fixed attribute will not change. OK, a key point here is that the content is all on an older Xcode - Xcode 11. So the features are all quite different. Trying to follow along still! Ok, can't even find size inspector! No point doing this on this earlier version of Xcode. So skimming through instead. I get the concept of all of this. The use of constraints etc. Autoresizing mask - flexibilities. All of the different options! Stack Views OK I've found some of the main views again! Out of practice with Swift UIKit! Stack view is non-rendering. That means non visible. Not even a background. Spacing is an attr...

RayWenderlich.com Layout in IOS Course - Part 1

Image
Here we are! On February Half Term again in RAK! So a sense of Deja Vu. Sadly, looking back on a whole year, there hasn't been much progress. But that's all going to change! Yes, I've been on much more of a roll recently and am ready to dive into more RW.com courses. The last one was a meaty one and took well over a month. Next one, which makes sense at this stage, Layout in IOS.  Start Time - 11:10 So this course is about layout in both Swift UI and UIKit. Cool! It made sense to go for this course rather than one of the ones from 2018 - anything before October 2019 does not include SwiftUI! So Stack Alignment is the first bit of this. Stack Alignment This is a container view that has its children in a line. V and H Stack. Option, command, return - shortcut for toggling canvas on and off. Still need to click resume though! Option command and p - shortcut for refreshing that view. Another shortcut to practise! To go straight to inserting from library, it i...

Treehouse Intermediate Course - Part 17 (Build Interactive Story App Project 1)

So only around 20 minutes maximum today - just a brief entry. I didn't code yesterday as the time I'd spent on the F1 sim the day before had hurt my eyes and head too much! I'm heading back to Dubai today where I have my screen, so that will make it more doable! Anyway, time to start a new project! Let's go.  Start Time - 08:41 Intro I love the idea of these. As mentioned in the last blog, Angela had a fantastic one in her course before. The only issue with that was how 'messy' the code was for when the story would keep growing. This will involve building reusable views, navigating to a new view, and going back to the beginning when done. Taking in text, delegates, complex models...will hopefully be useful! Navigation Controllers  Modal views.... But we are using stack views. We have a view on top of another and so on. Navigation controller is provided by Xcode. Two jobs - 1. Present custom views from the view controller 2. Present its own custo...

Angela Yu Xcode 12 Course - Part 10 (lectures 113 to 131)

Image
Right so next project! This was one of my favourite ones from before as there was a lot of logic but it was all very accessible too. With this idea, I could make limitless options and stories. Anyway, let's go! Start Time - 18:19 Right so that's the basic look of the app. And there's the decision tree for all the possibilities. Makes sense. OK project file downloaded! Next bit - tag values of the two buttons. Yes there are two options each time. Right, after some fiddly code, here's what I have - if sender. tag == 1 && storyIndex == 1 {             storyTextView . text = story3             topButton . setTitle ( answer3a , for: . normal )             bottomButton . setTitle ( answer3b , for: . normal )             storyIndex = 3                      } else if sender...