4 ms·
Took me 5 minutes. Copy and paste this into a playground: https://gist.github.com/maxhumber/1dbdf0d9c4539a8e145b3c630c6da0b3 https://gist.github.com/maxhumber/1
by emehex 4y ago
Took me 5 minutes. Copy and paste this into a playground: https://gist.github.com/maxhumber/1dbdf0d9c4539a8e145b3c630c6da0b3 https://gist.github.com/maxhumber/1dbdf0d9c4539a8e145b3c630c...
- deleted 4y ago[deleted]
- alexashka 4y agoYour answer is wrong. You've failed the fizzbuzz :) Change frame (screen width) to 300, 500 to see why.
- emehex 4y agoGood catch. Fixed with an extra ZStack.
- alexashka 4y agoGeometryReader 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.
- emehex 4y agoGeometryReader 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...
- deleted 4y ago[deleted]
- b3morales 4y agoNow please see how it looks on a device: https://postimg.cc/crtKHSTG https://postimg.cc/crtKHSTG