[x] Searched existing pull requests for ensure not duplicated.
Description
"Interestingly", UIView.drawHierarchy seems to have an internal hard-coded limit size of 8192x8192, and specifying a size beyond that resulting in an empty image is drawn.
It's reported in Apple's developer forums but there's no way properly address that issue.
So this PR adds a workaround that scales down the drawn image into a size that fits within the limitation once and then scales up to the expected size.
This may reduce the quality of the generated snapshots, but was not so critical when tested in the sample app.
Checklist
Description
"Interestingly",
UIView.drawHierarchy
seems to have an internal hard-coded limit size of 8192x8192, and specifying a size beyond that resulting in an empty image is drawn. It's reported in Apple's developer forums but there's no way properly address that issue. So this PR adds a workaround that scales down the drawn image into a size that fits within the limitation once and then scales up to the expected size. This may reduce the quality of the generated snapshots, but was not so critical when tested in the sample app.