how can I create a view in the shape of a light bulb with CAShapeLayer
?
Asked
Active
Viewed 112 times
1
-
2possible duplicate of [Triangular UIView or UIImageView](http://stackoverflow.com/questions/21776253/triangular-uiview-or-uiimageview), exact same principle – Cyrille May 28 '15 at 07:52
2 Answers
2
You can't accomplish this using an UIView
's frame
property. You could do this using a CALayer
like CAShapeLayer
. You have to set it's path
property accordingly.

Iulian Onofrei
- 9,188
- 10
- 67
- 113