getsidetrack / swiftui-pipify

A SwiftUI component for launching custom picture-in-picture experiences
MIT License
155 stars 14 forks source link

View rendered is of low quality #21

Closed adamtow closed 2 years ago

adamtow commented 2 years ago

I'm passing a simple view into the Pipify modifier, and the resulting rendered view (text and images) is of low quality. It's like it's scaling up from the view. I tried setting the renderer.scale property but that didn't seem to affect anything. This is evident in the Example project as well. Is there a trick to get high quality text and images in the Pip view?

Sherlouk commented 2 years ago

This is due to how Apple upscales the view size to fit in the PIP window. You can see in our basic example how the quality of the text view improves dramatically based on the frame size we provide.

In order to improve the quality, you need to provide a larger view frame size. (Ideally larger than the render size)

adamtow commented 2 years ago

Thank you. I increased the frame size 3x and it's rendering better now.