ios - How to create UIView with custom shape propely? -
i have create uiview custom shape, such triangular, half-rect, etc. used crop special image form , set background of view. although popular solution, not sure whether efficient 1 in terms of sustainability.
on other hand, found useful way of solving problem cashapelayer()
could please provide pros , cons of both approaches?
cashapelayer way!
with little effort can achieve same result less memory (ram) , less maintenance time (if want make triangle thicker example, you'll need new image small change in code , have it!). app size relatively smaller , don't have worry resolution images.
hope helps!
Comments
Post a Comment