I have divided a rectangular shaped image into two pieces as as shown below using masking.
|--------------\-------------------------
| \ |
| 1 \ |
| \ 2 |
| / |
| / |
|--------------/-------------------------
Now I have to place them in UIView using two UIImageView. How can I know what could be relative center or origin for second image. If first image at origin 0,0 then second image origin cannot be at (1stimage width, 0) because its a irregular shape. Any suggestion would be appreciated. If I am not able to clarify it then please let me know. I will try to upload some images.
You need to place the two
UIImageViews so that they overlap. The amount of overlap is determined by the images themselves. You can’t easily figure this out in code. You (or your artist) needs to figure out the overlap amount by examining the images. You need to store the overlap amount somewhere – either as a constant in your code, or in a data file alongside your image files – and use it to compute the position of the secondUIImageView.