Post

Replies

Boosts

Views

Activity

Just wanting to check a few things
I was watching / recreating the sandwich app on the "Introduction to SwiftUI" video and I discovered three things: 1) The Label () alignment seems to put align the image / symbol with the top of the character boxes rather than in line with the characters of the string, so I used two Spacer()'s either side of an Image() and Text() instead. 2) The .toolbar modifier seems to put the buttons at the bottom of the screen rather than at the top (iPhone 11 simulator and also iPad). I also needed to put a Spacer() in between them to force the Edit and Add buttons to each side of the screen horizontally. 3) There seems to be a persistence / visibility for refresh issue with the test data when running the Preview live - when I try and "Add" a new sandwich using the button, it doesn't appear in the previewed list, unless I edit the text in the Sandwich(sandwichName: "...", ingredients: ..., isSpicy: ...) instantiation line, which is rather odd. Please could you confirm my understanding is correct? Quite new to all this (although I do have a Comp Sci degree). I don't have a major problem, because this is all Beta and it's very nearly there otherwise. Thank you.
0
0
345
Jul ’20