Hey, we came across the same bug. Have you been able to workaround it?
Post
Replies
Boosts
Views
Activity
@MinsterE, did you figure out if it's possible?
@nehayward have you been able to solve this? Or at least confirm if it’s possible or not?
Edit - Sample Project
I've been able to isolate the issue in the sample project: Github Repo
Same problem :-/ Anyone know if this is a bug or an intended behaviour?
@fraserh I'm experiencing the same issue. Have you found any solution for this?
I can confirm that SwiftUI does not clean up something when view's state changes on macOS.
In my app, I change view's state on each mouse move and I can see the allocated memory climbing up and up as I move the mouse around.
The worst is that it's not just an issue of the memory. The app is also getting slower and slower - presumably because SwiftUI keep doing unnecessary work.
Sample view:
@State private var hoverX: CGFloat = 0.0
var body: some View {
Color.blue.frame(width: 50, height: 50)
.offset(x: hoverX, y: 0)
.onMouseMove { point in
hoverX = point.integral.x
}
}
Ok, it appears that CATiledLayer behaves unexpectedly when it's scaled only in one axis. When I applied scale transform to both X and Y axis, tiles were rendered correctly.
Any chance that some Apple engineer could relate to this and confirm whether this is intended?
Update
I managed to get it to work by using kUTTypeFileURL type identifier. I then decode the URL and load the file on my own.
I wonder, is this an expected behavior?