It seems the symbol still display correct image, but I did some extra work in my code like below
var theSymbol: UIImage
if #available(iOS 14, *) {
theSymbol = UIImage(systemName: "arrow.triangle.2.circlepath")
} else {
theSymbol = UIImage(systemName: "arrow.2.circlepath")
}
Post
Replies
Boosts
Views
Activity
May, 2022
For iOS SwiftUI Widget, I'm using App Group to share userDefaults between main app and widget, I saw same information like this, but only appear once, the second time widget retrieve info (via WidgetCenter.reloadTimelines) seems successful. Maybe we can define when read userDefaults failed, and treat this a Xcode log noise?
[User Defaults] Couldn't read values in CFPrefsPlistSource<0x2824ee900> (Domain: ***, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
Same
{
"code": 500,
"message": "internal-error",
"reason": "There was a problem with your request.",
"requestUuid": "f8bd710e-1f2a-xxxx-xxxx-xxxxxxx"
}
Testing this control was exhausting because I couldn't predict the results. Combining it with the original UI was an even more complicated issue.
I really wanted a permission control like Photo Library.
I found a workaround
https://www.avanderlee.com/swiftui/variable-widgetbundle-configuration/
@main
struct StockAnalyzerWidgets: WidgetBundle {
@WidgetBundleBuilder
var body: some Widget {
widgets()
}
func widgets() -> some Widget {
if #available(iOS 16.0, *) {
return WidgetBundleBuilder.buildBlock(StockAnalyzerWatchlistWidgets(), StockAnalyzerSymbolWidgets())
} else {
return StockAnalyzerWatchlistWidgets()
}
}
}
Any body using this in production environment?
Do you mean how to trigger a gesture in the simulator? You can try holding down the Option key and then moving your cursor.
I found this API for iOS 17
if #available(iOS 17.0, *) {
self.hoverStyle = .init(shape: .capsule)
}
There is still no good way to fix this. Simply add two spaces at the start and end of the string Text(" F ").
Hi everyone, I found it was due to the default wallpaper. Just change the wallpaper to any non-default one, and the customize button works again. Now I can continue adopting the widget tint mode.