Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add multiple imageView with different shapes?
    primarykey
    data
    text
    <p>Currently I am working for a collage app. I want to draw collage frame and after that I need to add images from Camera roll or camera . I need the following type view <img src="https://i.stack.imgur.com/g99Lr.png" alt="enter image description here"></p> <p>I have added 5 UIImageViews. To draw in shape I have added UIBezierPath like for imageview1 </p> <pre><code>UIBezierPath *path1 = [[UIBezierPath alloc] init]; [path1 moveToPoint:CGPointMake(0, 0)]; [path1 addLineToPoint:CGPointMake(150, 0)]; [path1 addLineToPoint:CGPointMake(0, 150)]; [path1 addLineToPoint:CGPointMake(0, 0)]; UIImageView *imgView1 = [[UIImageView alloc] initWithFrame:CGRectMake(140, 0, 160, 300)]; imgView1 . tag = 2; imgView1 . userInteractionEnabled = YES; imgView1. backgroundColor = [UIColor greenColor]; CGPathRef borderPathRef2 = [path1 CGPath]; CAShapeLayer *borderShapeLayer2 = [[CAShapeLayer alloc] init]; [borderShapeLayer2 setPath:borderPathRef2]; [[imgView1 layer] setMask:borderShapeLayer2]; imgView1.layer.masksToBounds = YES; [borderShapeLayer2 release]; [view1 addSubview:imgView1]; </code></pre> <p>Like this I have done for all 5. But after adding imageView5 touch is not detected on all other 4 views because its frame overlaping on the other four imageview. </p> <p>So I am not getting how to design this . I need to add images to all imageviews by touch action. </p> <p>Please help me. If someone have any idea about this then please share.</p> <p>Thanks In Advance.</p> <p>Following is the example 2 which is from <strong>Insta Collage app</strong>. <img src="https://i.stack.imgur.com/FkI5m.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload