objective c - Show Custom camera in shape of image with custom filters ios -
i creating feature open front camera in custom image shape. not sure how should achieved. have googled enough find out way achieve it. no success yet.
i have tried make layer using avcapture session & add image layer takes whole square frame of image not takes in image shape ignoring transparent pixels.
this need achieve : http://apple.co/2h7oe8l. please let me know if library or framework available or using core features of objective c can it.
any reference or hint highly appreciated.
thanks in advance.
instead of adding avcapture layer image layer add view , set image in mask
property of view. i.e:
let view = uiview() view.layer.addsublayer(avcapturelayer) view.mask = image addsubview(view)
- you need add new view hierarchy, image doesn't.
- you can use auto layout position , resize new view, image needs resized/repositioned directly in frame
Comments
Post a Comment