NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

Project 1 (Hacking with macOS 2019)--constraints

Forums > Books

Xcode 12.4

I have had no problem getting the result shown on p140 (non-resizing table view), and I see a list of "Table View Cell" in there, but as soon as I set constraints as suggested on p141 (Resolve Auto Layout Issues > Reset to Suggested Constraints once selecting "Source View Controller Scene") the text vanishes altogether.

I've tried to figure out which constraints I could set manually as I do in iOS, picking the constraints icon at the bottom (looks like a plus sign), and I can get what I think is the right result by manually changing the Border View constraints, but before I go any further I'd like to confirm that this is the correct approach? (or perhaps learn why the recommended procedure in the book fails...?)

Much appreciated!

(Sorry, for the life of me I can't figure out how to make the image display here!) (https://imgur.com/LG4NCSy)

1      

I've since completed the project passably, though I didn't manage to get the image to stick to the top despite attempting to constrain it.

If someone can advise on my original issue, I'd still be interested in knowing what that's all about.

1      

Hacking with Swift is sponsored by Play

SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!

Click to learn more about Play!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.