davidbures,
@davidbures@mstdn.social avatar

I need some design help, I’m not good at iOS development 😅

I have this screen. Originally, it was called “Dictionary”. This is where you look up words.

Then, due to SwiftUI being annoying, I had to add another title to that bottom sheet. Because that technically is also a part of the dictionary, I also gave it the title “Dictionary”. See pic no2 for what inside that bottom sheet.

But now I have the same title on the same screen twice, which is bad.

How would you solve it?

benbacardi,
@benbacardi@snailedit.social avatar

@davidbures how about the word "Explore"? That covers search, history, random words, and word of the day quite well.

davidbures,
@davidbures@mstdn.social avatar

@benbacardi That’s an interesting idea, thank you!

alpennec,
@alpennec@iosdev.space avatar

@davidbures you don’t need the sheet, do you? Why don’t you put the searchable in the View directly?

davidbures,
@davidbures@mstdn.social avatar

@alpennec Because it’s annoying to reach that far up on the Max iPhones. I know it goes against the established iPhone design principles, bit I still decided to fix the problem myself before Apple does

alpennec,
@alpennec@iosdev.space avatar

@davidbures I’m using an XS Max and I don’t found it that annoying. In the rare occasions, I do that 👇🏻.

But still, you can put the search at the bottom like in Safari and display the results above.

davidbures,
@davidbures@mstdn.social avatar

@alpennec I wanted to put the search down somehow, but as far as I know, this sheer solution this is the only SwiftUI way.

Unfortunately, using reachability is pretty much out of the question because most users don’t know about it 🥲

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures Is there supposed to be some other content that will fill the parent view? Like the part that currently says “Look up internet slang”? The way it’s presented now it feels like it’s just there to tell you to use the bottom sheet.

As for the bottom title, “Search” seems reasonable.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas
@ctietze Yes, it will get filled by the found definitions

“Search” seems like a good idea. I’m a it hesitant to be 100% about it because of the “Random word” and “Word of the day” sections of the sheet though, those aren’t really about searching 🤔

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures @ctietze Hmm. Could still make sense if those are really just search suggestions essentially right? If not, I’d put the word of the day and random words somewhere else entirely like a Home tab or something. But seems like you’re trying to go for a single screen app, so that might change a lot more.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas @ctietze I used to have tabs in a “Find My”-like bottom layout, but because that layout is not supported by SwiftUI (tab bar + sheet with detents), I had to use a hack that ended up extremely buggy and unusable :/ The tab bar ended up being obscured by the sheet randomly when you switched views, So I had to resort to this design (see pic of how it used to look)

So unfortunately, I can’t really move it anywhere 😅

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures @ctietze Seems like you’re going more for the Maps like search experience. I’d take inspiration from that app if that’s what you’re going for. But, the background map screen is different than what you’re doing content-wise, so may or may not make sense.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas @ctietze The main issue is putting the search at the bottom of the screen, which forces me into this slightly awkward design for my use case. Since I have to use .searchable and SwiftUI, this seems to be the only solution.

I definitely agree there are some differences in use between Maps and my app (in Maps, the background makes sense as you can interact with it completely separately from the sheet).

ctietze,
@ctietze@mastodon.social avatar

@jonduenas @davidbures Ah, yes, Maps! That's what this reminded me of. Now I have PTSD because the Maps UX is a bit weird at times.

Apart from flexing SwiftUI skills:

Why not put the search bar at the top? Then when the user taps the search bar, show the history there in an overlay (over the main content, but below/around the search)

"Word of the Day" might just as well be one default result, no?

ctietze,
@ctietze@mastodon.social avatar

@davidbures Oh, and: I don't want to ruin or replace your whole approach there.

But similar to naming things in code, having a hard time naming things in the UI may be an indicator of a confusing combination of things.

So if you look for a title, "Search" is good enough IMO, like @jonduenas suggested! Provides context to the text field.

To polish an app, I'd rather reach for different, less clever layouts

davidbures,
@davidbures@mstdn.social avatar

@ctietze @jonduenas I originally had the search at the top, because I was trying to follow established iOS design conventions (which is very easy in SwiftUI to be fair 😅). You can see that implementation here: https://mstdn.social/@davidbures/111991614166012784… (1/6)

davidbures,
@davidbures@mstdn.social avatar

Then I did some user testing and a lot of people complained that the search field is hard to reach in an app whose main workflow is searching. They had to keep reaching to the top of the screen to do anything, which “made their hands hurt”, which “made them resent using the app” (2/6)

ctietze,
@ctietze@mastodon.social avatar

@davidbures ah yes, modern iPhone users :x

davidbures, (edited )
@davidbures@mstdn.social avatar

So then I wanted to move the field to the bottom, but that’s extremely difficult in SwiftUI. Nevertheless, I managed to do it through a sheet (pic 1 in the first post of this thread). This implementation didn’t have a title in the sheet, which was the intended design. At this point, I was using a normal Text Field… (3/6)

davidbures,
@davidbures@mstdn.social avatar

Unfortunately, I had to move to a .searchable field instead due to a combination of factors. Now, I ran into a SwiftUI problem: in order for the field to show up properly, I had to create a NavigationStack and put the field in the title. (4/6)

davidbures,
@davidbures@mstdn.social avatar

This brings another problem: there’s no way to remove the reserved space for the title, so I either had to live with a huge useless space above the field (https://mstdn.social/@davidbures/112383747464089134) or try to hack together an awkward and jittery animation, which looked like 💩 (https://mstdn.social/@davidbures/112384183239415093) (5/6)

davidbures,
@davidbures@mstdn.social avatar

So after struggling with it for days, I had to concede that I would have to have something as the title in the sheet, which is how we ended up in this “double title” situation (6/6)

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures Yeah that’s SwiftUI for ya 😅 . It’s very difficult to go outside Apple’s established design language. Not sure what to suggest other than trying to not use searchable, dipping into UIKit, or just ignoring your user complaints lol.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas I’m with you completely 😅 The sad thing is that Apple is using something like searchable without a title in Maps, although it’s 100% UIKit

Unfortunately, I can’t write UIKit and don’t really want to learn it just for this (I’m a macOS dev who just happened to write this one iOS app, and I have no desire at all to develop iOS apps), and the complaints were pretty serious, so it feels like I’m between a rock and a hard place here

jonduenas,
@jonduenas@mastodon.world avatar

@davidbures You said you HAVE to use searchable? Any way around that requirement? Rolling your own from scratch would give more flexibility.

davidbures,
@davidbures@mstdn.social avatar

@jonduenas That’s a great point. Originally, I only had a text field. Then I figured that Apple would have an issue with a normal text field being used for searching with no indication of it being used for that, so I set out to create a custom field.

Unfortunately within SwiftUI, that ended up being impossible, as the animations were really bad (https://mstdn.social/@davidbures/112381954766424204).

I tried using the UIKit equivalent, but there were some issues with it, so I had to settle for searchable

ctietze,
@ctietze@mastodon.social avatar

@davidbures why is there a sheet and will the non-sheet background ever fill?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • SwiftUI
  • DreamBathrooms
  • thenastyranch
  • ngwrru68w68
  • magazineikmin
  • khanakhh
  • rosin
  • mdbf
  • Youngstown
  • slotface
  • everett
  • GTA5RPClips
  • kavyap
  • Leos
  • InstantRegret
  • JUstTest
  • Durango
  • osvaldo12
  • ethstaker
  • cubers
  • tacticalgear
  • tester
  • provamag3
  • cisconetworking
  • modclub
  • anitta
  • megavids
  • normalnudes
  • lostlight
  • All magazines