ios - How do I make a custom border around a UIView? -


i'm trying make semi-transparent border around uiview. idea show picture have border cover edge of picture yet still allow see behind border. want border have different border-widths different sides. on top have border of 80 pts, on bottom want border of 60 pts, , on sides want border of 10 pts. know using code :

uiview.layer.bordercolor = [uicolor bluecolor].cgcolor; uiview.layer.borderwidth = 10; 

will give uniform border of width 10 around inside of uiview, how set different border widths different sides of uiview?

here's simple solution. add label onto uiview, clear text on label , set label background color border color. set origin (x,y) of label origin (x,y) of view. , set width of label width of uiview, set height 1 or 2 (for border height @ top of uiview). , should trick. or else can use uibezierpath class same..


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -