I'm working on a macOS SwiftUI app. I notice that Button text does not change color properly when the app changes between Dark and Light mode. Shouldn't the builtin Button be handling this automatically? The Text views seem to handle it fine and switch their text from white to black.
The Button text can become completely invisible when I go from Dark to Light mode. Restarting the app fixes it.
I can change the Dark/Light mode manually in System preferences, or it changes at certain times of day because I have it set, usually, to "Auto".
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
If I purchase a product with a test session in my unit test, everything works as expected. I see a purchased transaction on my payment queue.
But if I set the property to make it fail, nothing happens. Shouldn't I observe a transactions with transactionState == .failed?let session = try! SKTestSession(configurationFileNamed: "Configuration")
session.disableDialogs = true
session.clearTransactions()
session.failTransactionsEnabled = true
session.failureError = .unknown
session.buyProduct(productIdentifier: productID)
Has anyone used this?
This observer normally gets called. But not when I set failTransactionsEnabled. public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
Hi all,
The WWDC video offers (at about 16:45) as short explanation as to why it's "objectWillChange" instead of "objectDidChange". He said it's because SwiftUI needs to coalesce the changes.
Okay, but then how does it know when the changes have ended?
It seems like you'd need two events. Something like:
self.objectWillChange.send()
self.foo = ...
self.bar = ...
self.objectHasFinishedChanging.send()
or
self.objectChanges {
		self.foo = ...
		self.bar = ...
}