This seems to yield the desired result. It's not very elegant but it works:
struct MyView: View {
var scene: SKScene // this is a SKScene with .aspectFit scaling mode
@State private var scaledHeight = 0.0
var body: some View {
List {
Section {
SpriteView(scene: scene, options: [.allowTransparency])
.frame(height: scaledHeight)
.background(GeometryReader { geo -> Color in
DispatchQueue.main.async {
scaledHeight = geo.size.width / scene.size.width * scene.size.height
}
return Color.clear
})
}
Section {
Text("SomeOtherStuff")
}
}
}
}
Post not yet marked as solved
It seems to work properly if I take action on the .ended state. However, this state is only attained when the touch ends, which isn't how I expect a long press to be triggered.
Ok, I may have found a solution by using UITableViewDelegate's indexPathForPreferredFocusView instead of relying on preferredFocusEnvironments.
Post not yet marked as solved
This also seems to break SwiftUI previews on my tvOS target. The preview fails and Xcode complains about the iOS storyboard being present and unsupported.
Post not yet marked as solved
I'm pretty sure the App Store prices include the VAT. Apple collects that and gives you 70% of what remains. They are the ones handling sales tax payments to the local government.You are responsible for declaring your income and paying income tax on that.
Post not yet marked as solved
French Canadian here. Amélie is listed as a French (Canada) voice. She seems to speak in more of a standardized (i.e. "international") French. I tried "Amélie (améliorée)" and she did sound better.
Post not yet marked as solved
I'm not sure it's for you to decide which data is personal enough.
In Xcode 11 this worked fine. I tried it in both iOS 12 and iOS 13 simulators and, just now, on a 6th gen iPod touch running 12.4.2.[Xcode 11 does display warnings when building for the iPod touch: SF Symbol '...' is unavailable prior to iOS 13.0]
I believe I found the built-in fallback:- in your storyboard, specify the SF Symbol you want to use (let's say, "gear")- in your assets catalog, create an asset with the same name ("gear")On iOS 13, the SF Symbol will be used. On prior versions, it will fallback to using the same named asset from the asset catalog!
Thank you for the input, guys. I was hoping IB would have a built-in fallback so we don't have to add more lines of code. I'll see which path I take at this point.
In code I could create separate UIImage objects (as your code snippet shows). However, my bar button items are all defined in the storyboard.
Post not yet marked as solved
Yes, I dragged it to the trash. That worked fine on my work iMac but on my home MB, I actually had to purge some of the Xcode files in ~/Library because the App Store thought it was still installed.
Post not yet marked as solved
Check this thread:https://forums.developer.apple.com/thread/124010
Post not yet marked as solved
Had a similar issue on both my work iMac and home MacBook. In both cases, I resolved it by removing the existing Xcode 11 before installing Xcode 11.1 from the App Store.
Post not yet marked as solved
You can install Xcode 11 GM seed 2 side by side with Xcode 10.x. Just rename the .app file before moving it to the Applications folder.