41,399 questions
0
votes
0
answers
18
views
Bindings, asynchronous calls, callbacks and states in swift
so I am trying to set up a general function that some of my views can call to do some asynchronous callbacks. I got it to work, but wanted to move the code to a function and for the life of me, I ...
-1
votes
0
answers
29
views
How to analize what causes the hang using instruments when actualy there nothing happens on main thread? [closed]
This is the part of the graph to detect what causes the hang using time Profiles with Instruments.
What actually takes that 516 ms?
I have studied this video tutorial from Apple but they focus on ...
0
votes
0
answers
32
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 ...
0
votes
0
answers
26
views
How to achieve NSPopupButton "grouped form" style using AppKit?
How does one achieve the "grouped" style controls without SwiftUI, using only AppKit? I've played with combinations of bezel styles and other properties, but cannot get it to fit that style.
...
0
votes
2
answers
46
views
How can I anchor one view to the containers center, while anchoring an additional view to its edge?
I'm new to SwiftUI and trying to understand how I can keep one view horizontally centered on the device screen, while anchoring an additional view to its trailing edge (without uncentering the ...
1
vote
0
answers
24
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
35
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
107
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)
...
0
votes
1
answer
44
views
SwiftUI Table and TextEditor stacked vertically and enclosed in one ScrollView
I would like to have a ScrollView that encloses a Table and a TextEditor, stacked vertically. With this arrangement, a user would always scroll down past all the table rows to find the text editor.
...
0
votes
0
answers
40
views
Trying to make a wrapper to asynchronously load my data for different views
ok, I am fairly new to swiftui, and I have a app with a bunch of views where some of the need to asynchronously. I started out thinking that I should just make a View where my "real" view ...
1
vote
1
answer
47
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.
...
-1
votes
0
answers
41
views
Colors on Older Hardware Don't Appear as Expected
I have created an Indicator for a horizontal scroll view that contains SwiftUI Images. The Indicator works and does just what you would expect. However, I was very surprised to find that these colors ...
1
vote
1
answer
27
views
Make TabView content background transparent so that a "constant" UIViewRepresentable WKWebView can be displayed behind it
I am creating an app where the primary UI is a WKWebView and SwiftUI is only used for odds and ends of the app. I am running into a snag using the SwiftUI system UI TabView. If you run this sample app ...