If you have a UIView
Imagine the view being full of text, animations, a cat photo, a gradient, or indeed any of the stuff a UIView can be full of.
It's easy to tilt it back to the left in 3D
or back to the right ..
(BTW I highly recommend the perfect OHCubeView ohcubeview when you have to do that sort of thing.)
But I want to crease a view along a seam, and have one side going backwards to the left and the other side going backwards to the right ..
!
My first solution was simply: whatever the view is (the user is typing in text, a photo of a cat, whatever), just perfectly duplicate it, and then solve the problem in the obvious way.
That's inelegant, but does work.
But...
the thing I want to fold like this, is ... an SKView with an emitter in it.
Particle emitters are of course random, and while two of the same one will look similar, it's not a real solution.
Essentially, if someone knows how to "copy" a UIView to another, well, view, or something ...
the problem would be solved.
For a problem like this in a game engine, say, you just throw a "virtual camera" (whatever the concept is in your favorite game engine) on the thing in question, and put the other half, or whatever, anywhere you want, but, I don't know the analogy of that in iOS!
Does anyone have an angle on this:







I could think of a couple of things to try:
Copy a the contents of a UIView to something: You could take a screen shot:
... to an image:
... or to a view (which is according to Apple's docs faster than the above):
Lastly, this project is quite old, unmaintained and written in Obj-C, but maybe it gives you an idea how they did it for you to do on your own:
https://github.com/honcheng/PaperFold-for-iOS