Email or username:

Password:

Forgot your password?
Top-level
Harshil Shah :psyduck:

@grishka If you compare SwiftUI just to AppKit or UIKit, sure, I can see your point. But it's whole deal is it needs to be compared to both. Smart defaults things like spacing, appearance, etc. is table stakes for a cross platform technology

7 comments
sam henri gold

@harshil @grishka I think some of the defaults are quite reasonable, I just wish it weren't treated as magic. `Text(“Hello”).padding()` applies system-determined mystery padding. And you can't just query how much padding was applied.

The default stack spacing for a stack containing two shapes is different than stack containing two text labels.

I just wish I had access to that so I can make adjustments rather than either forgoing the smart defaults entirely or doing geometry reading nonsense

Harshil Shah :psyduck:

@samhenrigold @grishka Agreed, I want there to be more info, and more customisation! I was mad about one of these just yesterday too: mastodon.social/@harshil/11258

Ryan Lintott

@samhenrigold @harshil @grishka Some of this spacing information is available inside the Layout protocol but I agree it's still not convenient for most cases. I don't think there's any way to get the default padding amount. developer.apple.com/documentat

Григорий Клюшников

Harshil, well here's another one of my strong opinions: don't do cross-platform GUIs. Don't share any UI code between platforms with disparate interaction paradigms. They're disparate enough to warrant different design, so they need to be developed for separately as well.

Otherwise you end up with the disaster that was the unprompted, unnecessary macOS system settings redesign. Or modern Windows, for that matter.

You try to target multiple platforms, you end up with meh UX on all of them. It's the law of cross-platform GUIs.

Harshil, well here's another one of my strong opinions: don't do cross-platform GUIs. Don't share any UI code between platforms with disparate interaction paradigms. They're disparate enough to warrant different design, so they need to be developed for separately as well.

Otherwise you end up with the disaster that was the unprompted, unnecessary macOS system settings redesign. Or modern Windows, for that matter.

Harshil Shah :psyduck:

@grishka Ehh, I disagree there. Heck the iPad invalidates the whole argument by itself. Touch, trackpads, pencils for input, and windows as small as an iPhone SE and as large as a Mac with an external display. Do you want to develop for it with 4 separate frameworks?

Григорий Клюшников

Harshil, the iPad doesn't invalidate it, it's basically just a large iPhone. The touchscreen is the default mode of interaction for 99% of how people use iPads. UIKit, Apple's touch-focused framework, is its native UI framework (that SwiftUI is built on top of).

Apple's continued insistence on blurring the lines between UIKit (touch) and AppKit (keyboard + mouse/trackpad) really rubs me the wrong way. Steve Jobs would've never approved of any of that.

Harshil Shah :psyduck:

@grishka If you're gonna invoke a man who’s been dead for a decade to argue against a product decision that has been in place for half of the iPad's existence, I'm not sure what we're doing here

Go Up