4 ms·
I'm having great fun building a SwiftUI app for a client. I haven't encountered any showstoppers, but several times I've changed the design to make it easier fo
by cerberusss 7y ago
I'm having great fun building a SwiftUI app for a client. I haven't encountered any showstoppers, but several times I've changed the design to make it easier for myself.
To give you an example: pull-to-refresh isn't there yet. You have to build it yourself. I looked for a searchbar and I built it myself as well.
However building the GUI itself is very fast, because it compiles and immediately previews your code. The preview can be changed with the mouse, which updates your code again. That aspect is very, very nice and made my client smile when we were adjusting some padding, font sizes, image sizes etc. on the fly.
- bsaul 7y agoMy personal showstopper was dealing with attributed strings. I couldn’t get an equivalent of multiline uitextview of attributed string. It happened after just 20 minutes building a real world app, which made me wonder if anyone has ever built anything real at apple with this framework. (Also, i couldn’t get a list of all the types of views and their documentation anywhere in apple’s documentation).
- Razengan 7y agoYou can have attributed strings! After a fashion: Text("Hello,").italic() + Text("World!").fontWeight(.bold) Works with multiple lines, multiple font sizes etc. Another undocumented gem that I discovered via the SwiftUI community. You should be able to build a constructor that reads a string with formatting codes like Markdown and spits multiple Text views.
- dep_b 7y agoYeah it looks very promising since you can still use constants for all kinds of stuff like padding and colors but you do have that immediate feedback you get from interface builder. It seems to be faster than live code rendering views in interface builder, which admittedly is a really low bar to pass.