3 ms·
As a typical Mac snob, I used to care a lot about using native widgets. But UIKit doesn't even ship with a good-looking button class, and native apps often rewr
by gurkendoktor 7y ago
As a typical Mac snob, I used to care a lot about using native widgets. But UIKit doesn't even ship with a good-looking button class, and native apps often rewrite UI elements because the builtins are not very flexible (hello UITabBar). In theory that should make it easier for toolkits like Flutter to gain ground.
- zapzupnz 7y ago> But UIKit doesn't even ship with a good-looking button class There are so few times when one should want to use a plain button in iOS anyway. Most times when a user needs to make a choice or start a task, they pick it from a UITableView, UIAlertController presented as an action sheet, or press a UINavigationItem. > often rewrite UI elements because the builtins are not very flexible (hello UITabBar) What's specifically missing here? You have items, each has an icon and text, they can also have badges. Tapping on items changes the currently shown content view. What's a tab bar supposed to do besides that? A lot of the times I see these sorts of basic UI paradigms recreated, or the typical iOS HIG ignored by recreating an Android-style UI, the app can sometimes break when iOS has a major (or even minor) update or ignore accessibility guidelines. They're usually not significantly different in function, usually just aesthetics, and not usually sufficiently so to justify the cost.
- gurkendoktor 7y ago> There are so few times when one should want to use a plain button in iOS anyway. Almost every first-party app starts with a "Data & Privacy"/"What's New" dialog that uses a blue pill button, and almost every third-party app has a big fat "log in" button. Or look at Apple's redesigned Maps app. I don't know if I've ever worked on an app that didn't have its own ad-hoc button class. > What's a tab bar supposed to do besides that? Facebook, Instagram, Tweetbot etc. seem to have their own implementations because they want to hide the labels. Spotify has one to animate the icons when tapped. Audible has one to show the album art in the middle item. I'm going through my third-party apps right now, and only WhatsApp seems to use UITabBar as it was intended. > the app can sometimes break when iOS has a major (or even minor) update So did UITabBar earlier this year: https://stackoverflow.com/q/53084806 https://stackoverflow.com/q/53084806 I nudge my clients towards stock UIKit components as much as possible, for all the reasons you mentioned, but I don't think UIKit is that much better than e.g. Flutter in the way that AppKit is many times better than Electron.
- zapzupnz 7y ago> Facebook, Instagram, Tweetbot etc. seem to have their own implementations because they want to hide the labels All one has to do, to hide the labels, is set the labels to "" and adjust the image insets to account for the empty space. > Audible has one to show the album art in the middle item That's possible with stock UITabBar. Just set the appropriate image for the UITabBarItem and, again, adjust the image insets. > and only WhatsApp seems to use UITabBar as it was intended That's surprising. I don't use WhatsApp anymore, but most of it seemed custom. Well, that scores WA one point, I guess. > I don't think UIKit is that much better than e.g. Flutter in the way that AppKit is many times better than Electron Until you want to use iOS' built-in accessibility features, and you are disappointed to see that third party apps needlessly reimplemented widgets and didn't do the extra work to make them accessible. Sadly, accessibility is always seen as an optional extra, not a fundamental feature. It's been a fundamental feature of AppKit and UIKit since time immemorial. When some of these apps make it to macOS via Project Catalyst, this issue might become exacerbated to some extent.
- gurkendoktor 7y agoYou can hide the labels in a stock UITabBar, but you can't change its size, and I suspect this is what motivated Facebook and others to hide the labels in the first place. You are right about the Audible use case, it might actually be using using a stock UITabBar. And in my experience WhatsApp has always been a pretty good platform citizen. It's one the very few icons on my home screen that tries to match Apple's style. Agreed about a11y, I'm glad that Apple keeps bringing it up as a core feature.