I tried putting the closure in multiple different ways but it always shows the whole screen and not just the view I want captured. Here is some code from my project.
(I did see that iOS 16 has some new share screen features but im targeting iOS 14+)
structContentView:View{//... some environmentObjectsvarbody:someView{ZStack{canvas.snapshotView{snapinsnapshotMaker=snap}pallet}}varcanvas:someView{Canvas()}}structCanvas:View{//... some environmentObjectsvarbody:someView{Rectangle().overlay(// Place current images on the canvasForEach(images){$0})}}
I've tried putting the canvas and pallet in their own ZStacks.
I want a snapshot of just the canvas without the pallet.
Thanks for your help. Hope your having fun at WWDC.
oh I see, I've tried with a ZStack and it takes a screenshot of everything. Basically what you see on screen is what you see on the png, while you want a screenshot of a partial content of the ZStack.
I will try to see if there is a solution to that
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I tried putting the closure in multiple different ways but it always shows the whole screen and not just the view I want captured. Here is some code from my project.
(I did see that iOS 16 has some new share screen features but im targeting iOS 14+)
I've tried putting the canvas and pallet in their own ZStacks.
I want a snapshot of just the canvas without the pallet.
Thanks for your help. Hope your having fun at WWDC.
oh I see, I've tried with a ZStack and it takes a screenshot of everything. Basically what you see on screen is what you see on the png, while you want a screenshot of a partial content of the ZStack.
I will try to see if there is a solution to that