Hacker News new | past | comments | ask | show | jobs | submit login

Your answer is wrong. You've failed the fizzbuzz :)

Change frame (screen width) to 300, 500 to see why.




Good catch. Fixed with an extra ZStack.


GeometryReader was not part of fizzbuzz. Replace geo.size.width * 0.1 with 10 to see your code break.

Now tell me, why did it break? Do you even know? Because I don't.

I don't know why half the shit works as it does, and I've written non-trivial SwiftUI code for 6 months. I did not have this problem with UIKit and interface builder.


GeometryReader is a pretty critical part of the SwiftUI framework. I'd recommend getting familiar with it!

Saying "you can't use GeometryReader" would be like saying you can't use UIKit's Auto Layout...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: