GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

DAY 93

Project 18, part 2


Today we’re continuing our technique project on view layout, exploring one of the most powerful layout views we have available to us: GeometryReader. This lets us read the size and position for a view at runtime, and keep reading those values as they change over time.

I realize that probably doesn’t sound terribly special, but it opens the door to a number of fascinating effects that look great and only take one or two lines of code to create. Yes, one or two – once you understand how GeometryReader works I really hope you’re able to take some time to experiment!

As the British poet William Blake once said, “the true method of knowledge is experiment,” so if you really want this stuff to stick in your head you should play around with it!

Today you have four topics to work through, in which you’ll learn about frames, coordinate spaces, GeometryReader, and more.

If you make some fun effects, try recording a video and sharing it online – it’s a great way to stay accountable, but also to show folks how far you’ve come!

How can this day be improved?

Great job on finishing another day! If you still have questions about what you learned, please send them in using this form – I'll do my best to address the most common problems in the next course update. Thank you!

Now share your progress…

If you use Twitter, the button below will prepare a tweet saying you completed today, along with a celebratory graphic, the URL to this page, and the challenge hashtag. Don't worry – it won't be sent until you confirm on Twitter!

Alternatively, copy and paste the text below to your preferred social network - I'm @twostraws on Mastodon.social, Bluesky, and Threads.

🎉 I just finished Day 93 of the #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/93 via @twostraws

Need help? Tweet me @twostraws!

 

Hacking with Swift is sponsored by Alex.

SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!

Try for free!

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

100 Days of SwiftUI


The 100 Days of SwiftUI is a free collection of videos, tutorials, tests, and more to help you learn SwiftUI faster. Click here to learn more, or watch the video below.

Back to 100 Days of SwiftUI

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.