Skip to main content
0 votes
0 answers
43 views

List animations broken in macOS Sequoia but work in Sonoma (FetchRequest, Picker filters)

In macOS Sonoma, my SwiftUI code performs smooth, expected animations when List contents change — both when using @FetchRequest with a changing predicate and when filtering manually via Picker ...
user10711707's user avatar
1 vote
1 answer
145 views

How to remove internal padding to the right of SwiftUI Picker

I'm curious, have you noticed how Pickers have different internal padding when in a Form vs not? Of course, there are many controls that have special looks within the context of a Form. But I would ...
Curious Jorge's user avatar
3 votes
1 answer
98 views

How do I extract the choices of a menu picker in XCTest?

My app uses the SwiftUI Picker, and I'd like to test that it only contains the expected choices. When I try to extract the choices in XCTest, I get back an extra entry, Choose an option, Option 1, i.e....
Pabtuz's user avatar
  • 43
0 votes
1 answer
96 views

Selecting in Picker does not change selection

I am trying to display the picker and the selected emoji on the screen. Here is the ContentView: struct ContentView : View { @StateObject private var viewModel = ContentViewModel() @State ...
Kelsey Zhou's user avatar
0 votes
0 answers
265 views

SwiftUI Navigation Link Picker Style selection problem

I am working on a small todo app project with SwiftUI/Swift in Xcode 15.4. I have a model like this: @Model class Category { var catTitle: String = "" var catEmoji: String = "" ...
helloimbrando's user avatar
0 votes
1 answer
467 views

SwiftUI Picker selection trailing alignment

I am fairly new to SwiftUI and trying to figure out how to achieve trailing alignment for the Picker view selection. Eg for UIKit, in a normal UITableView cell, you can have a Right Detail cell with a ...
Abhinav Singh's user avatar
0 votes
1 answer
69 views

Coloured options in a drop down Picker using ForEach in Swift UI

I'm interested in creating menu similar to one displayed in the screenshot below. This menu is accessible via Rules settings of Mail.app. I'm interested in colouring the symbol on the left hand side. ...
Konrad's user avatar
  • 18.8k
0 votes
0 answers
130 views

Assign custom font to picker view choices

I use a custom font throughout my app (font is correctly setup). I'd like the SwiftUI Picker appearance to use the same custom font. Here's a simpler sample code where the text should be in bold but ...
invalidArgument's user avatar
0 votes
2 answers
127 views

Can't get Swift picker to display selected choice

I can't for the life of me figure out why my first picker is not changing. It is stuck displaying "Option A" always no matter what I pick. The other pickers work just fine. struct ...
j3Googs's user avatar
0 votes
1 answer
378 views

How to increase Picker selection width?

How can I adjust the width of the list displayed when the user taps a picker? Note that I don't need to adjust width of the picker itself - only what is displayed over it. For example, consider a ...
Edward Brey's user avatar
1 vote
2 answers
109 views

“Cannot convert return expression of type” error in custom Picker init method

I’m trying to build an extension on a SwiftUI Picker, but I’m getting the following error inside the content closure when trying to compile: Cannot convert return expression of type 'ForEach<Data, ...
ospr's user avatar
  • 1,681
0 votes
1 answer
159 views

Why does data not populate list inside popover in SwiftUI?

What I'm Looking For I'm hoping someone can help me understand what's going on and why SwiftUI is behaving the way it is in this scenario. What I was trying to do I was originally trying to create a ...
MarlonJames's user avatar
1 vote
1 answer
2k views

How to create searchable picker menu in swiftUI

I am finding to create picker menu with self contain search bar view and once user enter any character as per result of search filter picker menu will automatically reloads in SwiftUI. Below is the ...
Bhimashankar's user avatar
1 vote
1 answer
585 views

When scrolling in a Menu - Picker, releasing the tap mid-scroll causes it to keep jumping to the top

struct PlainTextPicker<T: Hashable>: View { @Binding var selection: T? let defaultString: String? var options: [T] var toLabel: (T) -> String // body Menu { ...
SeongHyeon LIm's user avatar
0 votes
1 answer
2k views

SwiftUI How to implement a custom dropdown menu like a Picker

I have been brainstorming ideas for implementing a button dropdown view similar to what you see in a default Picker. I have been experimenting with this in general to find a way to overlay a view on ...
Matt Braniff's user avatar

15 30 50 per page
1
2 3 4 5 6