Post

Replies

Boosts

Views

Activity

Reply to Reading widget configuration intent when launching the app
Same issue in Xcode 16.3 / iOS 18.4. What I also noticed is if you do WidgetCenter.shared.getCurrentConfigurations, it returns all configurations with their intents that can be successfully retrieved, but there's seemingly no way to know which from which configuration (i.e. from which widget from the home screen) the user launched the app. I'd consider it a bug, but I won't bother sending a feedback into the black hole. Looks like I'm going to use deeplinks instead, it's a pity.
Topic: App & System Services SubTopic: General Tags:
Apr ’25
Reply to watchOS Button background color in SwiftUI?
I've managed to achieve this by building upon the advice to use BorderedButtonStyle, however I also call the .opacity(_:) method of the Color with the value way higher than 1.0: Button("My Button") { 		// Do something here } .buttonStyle(BorderedButtonStyle(tint: Color.blue.opacity(255))) Works great for me in Xcode 12.3 with the watchOS 7.2 simulator. I didn't test it on the older versions of watchOS or on a real device. I played with the different values of opacity and seems like the color changes when the value is in range 0...10, but anything larger than 10 always yields the same color. I used 255 because I like this number. Unfortunately, the Color.opacity(_:) - https://developer.apple.com/documentation/swiftui/color/opacity%28_:%29 method is not documented as of December, 2020, so I have no idea whether this is an expected behavior or just a dirty hack that will break in the future releases. Would be great to have some insights on that from the SwiftUI team.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20