CMD-OPT-ENT

Accidentally losing your SwiftUI preview could send you into a frenzy. I can’t see squat! Quick search on the forums helped me out after combing the menubar did not help, Command-Option-Enter to start & hide the preview window.

Now onto the lesson:

It is very mathy, and there are several lines to write. Resist the urge to copy and try to type it out.
I made a bug then caught it when I noticed the rendering did not appear quite correct.
width += xScale

width *= xScale

Things went fine till it was time to create the RotateBadgeSymbol. I had a strange error that I forgot to screenshot. Building the project (CMD-B) seemed to solve the error that shut the preview down.

They have us use CGFloat mostly throughout this chapter. CGPoint helps us shape the Badge, and later CGPoint builds the mountain which will have it hover over the badge. Wrapping up the lesson, they had us place new files in a folder ‘Badges’. After doing so, I am unable to preview ‘Badge.swift’ but the others can be previewed 😤
Quitting Xcode & restarting the project seems to do the trick here.

This lesson was pretty cool- creating a gradient seems straightforward & having a path ‘draw’ a shape and the shape is moved around- there’s a lot to wrap my head around before I start making my own shapes. Given limitless time I’d probably look around here and see how to master Path

Standard

Leave a comment