Post

Replies

Boosts

Views

Activity

English to English translation?
My app supports English and another language. The English string catalog is empty. Running the app in English in Xcode 15 beta 3, all strings are displayed in capital letters. It seems the behavior when translations are missing. Do we need to translate each English key into the same English translation, or is it a bug?
3
0
970
Jul ’23
@Observable and @AppStorage
Converting class Model: ObservableObject { @AppStorage("prop0") var prop0 = 0 } to @Observable struct Model { @AppStorage("prop0") var prop0 = 0 } created error: Property wrapper cannot be applied to a computed property How can properties of @Observable models be saved in user defaults?
7
6
4.1k
Jun ’23
Value based colors
How to create a chart where each data mark has a color based on its value? Like this chart: https://observablehq.com/@d3/gradient-encoding With the following code, the whole curve has one color only. My function Color.forTemperature() returns different colors for different temperatures. Chart(temperatures) { temperature in LineMark(     x: .value("Day", temperature.date, unit: .day),         y: .value("Temperature", temperature.value)     ) .foregroundStyle(Color.forTemperature(temperature.value)) }
2
0
1.7k
Jul ’22
Turn off white balance
I'm trying to measure light quality with the camera, not to capture good looking photos. How do I get raw camera sensor data, without processing such as white balance? If I lock white balance mode when setting up capture session as following, will white balance be turned off during the session? if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked }
0
0
626
Oct ’21
English to English translation?
My app supports English and another language. The English string catalog is empty. Running the app in English in Xcode 15 beta 3, all strings are displayed in capital letters. It seems the behavior when translations are missing. Do we need to translate each English key into the same English translation, or is it a bug?
Replies
3
Boosts
0
Views
970
Activity
Jul ’23
healthDataAccessRequest
Has anyone used healthDataAccessRequest successfully in SwiftUI? How does parameter trigger work?
Replies
0
Boosts
1
Views
760
Activity
Jul ’23
CameraView
Is there a programming example for CameraView?
Replies
1
Boosts
0
Views
764
Activity
Jul ’23
@Observable and @AppStorage
Converting class Model: ObservableObject { @AppStorage("prop0") var prop0 = 0 } to @Observable struct Model { @AppStorage("prop0") var prop0 = 0 } created error: Property wrapper cannot be applied to a computed property How can properties of @Observable models be saved in user defaults?
Replies
7
Boosts
6
Views
4.1k
Activity
Jun ’23
Should LocalizedStringResource be Sendable?
I'm trying to convert s String property of a Sendable structure to LocalizedStringResource, so that Xcode extracts it into the string catalog. There is a warning since LocalizedStringResource is not Sendable currently.
Replies
2
Boosts
0
Views
1.2k
Activity
Jun ’23
Developer mode on Apple Watch
How to enable developer mode on Apple Watch with watchOS 9 beta?
Replies
7
Boosts
2
Views
13k
Activity
Jun ’23
How to display [Link]?
In SwiftUI, how to display a [Link<Text>]?
Replies
3
Boosts
0
Views
1.1k
Activity
Sep ’22
Value based colors
How to create a chart where each data mark has a color based on its value? Like this chart: https://observablehq.com/@d3/gradient-encoding With the following code, the whole curve has one color only. My function Color.forTemperature() returns different colors for different temperatures. Chart(temperatures) { temperature in LineMark(     x: .value("Day", temperature.date, unit: .day),         y: .value("Temperature", temperature.value)     ) .foregroundStyle(Color.forTemperature(temperature.value)) }
Replies
2
Boosts
0
Views
1.7k
Activity
Jul ’22
Request review in SwiftUI
The requestReview() method of SKStoreReviewController is deprecated in iOS 14 beta. There is a new requestReview(in windowScene: UIWindowScene), but with the App structure in SwiftUI, there is no UIWindowScene. How to request app review?
Replies
4
Boosts
0
Views
8.3k
Activity
Jul ’22
Large overlay
It seems an overlay is limited to the size of the base view. How to remove the limit? baseView.overlay {overlayView}
Replies
1
Boosts
0
Views
722
Activity
Jun ’22
Current time in widget
How to get current time in a widget (like the builtin clock widget), to update the widget based on the current time, since a widget is supposed to provide timely info?
Replies
0
Boosts
0
Views
683
Activity
Feb ’22
Turn off white balance
I'm trying to measure light quality with the camera, not to capture good looking photos. How do I get raw camera sensor data, without processing such as white balance? If I lock white balance mode when setting up capture session as following, will white balance be turned off during the session? if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked }
Replies
0
Boosts
0
Views
626
Activity
Oct ’21