All Questions
23,028 questions
0
votes
0
answers
30
views
swiftui composable menu widget [closed]
I'm trying to build a Menu in swiftui that opens a different sheet per option selected. So far, the only way I've found to do this is booleans for each type of sheet, or an enum with the type of sheet ...
1
vote
0
answers
23
views
Apple GCController.shouldMonitorBackgroundEvents value broken?
I am suspecting that setting GCController.shouldMonitorBackgroundEvents = true does not actually make the game controllers inputs accessible to the app when it is in the background.
About this value ...
0
votes
1
answer
34
views
Swift generic specialized type prevents protocol conformance
In swift, given the following protocols
protocol Mark {}
protocol Detector {
associatedType ViewType: View
func check(mark: some Mark) -> ViewType
}
Non-specialized ContentView compiles
...
0
votes
2
answers
104
views
Why SwiftUI redraws the body of my custom View since nothing related to him changes?
Here is an example:
struct DemoApp: View {
@State var viewModel = DemoAppViewModel()
var body: some View {
VStack {
DemoMonthView(date: viewModel.monthDate)
...
1
vote
1
answer
46
views
Swift protocol function requirement with both generic function arguement and generic return type
For a protocol
protocol Mark {}
Why would this compile 👉 generic argument only
protocol Detector {
func check(mark: some Mark)
}
class Vision: Detector { // conforms
func check(mark: some ...
0
votes
1
answer
35
views
iOS VoiceOver is not reading Korean when it is the primary language
One of our user is trying to use iOS's VoiceOver with our SwiftUI app and they are not able to use it properly in Korean Language
Issue is VoiceOver doesn't read Korean strings if the primary ...
1
vote
1
answer
47
views
Updating a preview image via @State and @Binding
I'm a total newbie, just started learning Swift a few days ago and SwiftUI today, so please be gentle :)
Trying to capture images from a camera and show them in a preview. This is for MacOS, not iOS.
...
0
votes
1
answer
36
views
interactiveDismissDisabled prevents the user from quitting the app?
I'm building a macOS app with SwiftUI and I have a modal I want to show users that must not be dismissed. interactiveDismissDisabled seems like the perfect fit for my use case (and indeed it works ...
0
votes
1
answer
72
views
Working with multiple different measurements in SwiftUI
I have an EntryModel below which consists of different types of entries (measurements being one type of entry)
import Foundation
import PhotosUI
import SwiftData
import SwiftUI
@Model
class ...
1
vote
1
answer
64
views
Is there a way to give the app a minimum frame without setting the min frame of the contents?
This example app when running on macOS 15.4 exhibits an odd animation behavior when opening and closing the sidebar.
All you need to do to fix it is remove the .frame(minWidth: 805, minHeight: 525) ...
0
votes
0
answers
52
views
StoreKit 2 Fails to Load Subscription Products
We are experiencing a critical issue where StoreKit 2 is returning empty products when using Product.products(for:), specifically on devices running iOS 18.4.
This issue does not occur on iOS 18.3 ...
1
vote
1
answer
107
views
Data not passing between viewModel and View
Long story short, I'm trying to pass information from Realtime Database, into a viewModel function/variable, then call that variable in a specific view.
Here is the viewModel.
import FirebaseAuth
...
0
votes
0
answers
83
views
How to use a Conditional inside a SwiftUI Picker
I have a picker where I want to lock any index that isnt -1 behind a paywall:
let images = ["person.slash.fill", "person.fill", "person.2.fill", "person.2.fill&...
0
votes
1
answer
50
views
How to hide background of matchedTransitionSource?
How can I hide the background of an animated NavigationLink while using the swipe-to-go-back gesture?
Here's what I currently have:
and what I want it to look like:
similar to the iOS Photos app. I'm ...
1
vote
1
answer
41
views
How to change color behind bottom sheet with SwiftUI?
My app's foreground color is this shade of blue and I need to display a bottom sheet at some point, but when the bottom sheet goes up, by default, the view behind it shrinks a little and the ...