Posts

Showing posts with the label programmatic layout

Treehouse Intermediate Course - Part 19 (Build Interactive Story App Project 3)

Part 19! A good effort I'd say! I'm pleased to have stuck with Treehouse and to have no immediate need for moving on from it. Although it's several years out of date, compared to how the Swift language has evolved, it still seems relevant and more accessible than I thought. Anyway, not so good is my failure to get an entry in nearly a week. So today I'm getting in some, and will do so again tomorrow and/or Sunday. Back to the story app! Start Time - 12:17 Page Controllers A whole new section here! Right - something new! How to programme views... So a new Cocoa Class created - a subclass of view controller. Cool. Awesome! The VC connected from the segue before is now linked to the Page Controller subclass; it works because changed the background colour to blue, which came up when the start button was clicked. Nice. So getting more technical. We can make the page value an optional, but we don't want there to be the absence of a value. We don't want t...

Angela Yu Course Part 11 (up to lesson 120)

Image
Back on a train for around an hour and ready to code! So last time it was really rewarding to crack the use of the if/else statements with the interactive 'Destini' story app. That could be easily extended and amended for lots of things! Now we're focusing on Auto Layout - something I've looked at before on Pasan's courses. I'm sure Angela will make it very accessible and shed some light on misconceptions from before! Auto Layout The point here is changing from portrait to landscape OR change the device type ruins the layout of the different text, buttons etc. The answer to this I know - constraints and auto layout! Resizing the background/canvas is a terrible idea! It would be fine for a different device, but then people have different phones/devices....again the answer is AL! Programmatic auto layout - this I looked at before with Pasan but it was very laborious. It makes more sense to set in constraints. Positioning UI Elements Programatically ...