Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Border Type in a view's border (iOS)

Tags:

ios

border

uiview

do you know if is it possible to apply a border type in a view?

I can do this

#import <QuartzCore/QuartzCore.h>
...
view.layer.borderColor = [UIColor redColor].CGColor;
view.layer.borderWidth = 3.0f;

But I don't know how to apply different borders (- - - - -, ---------, etc) to my view. How can I do it?

Thanks for your time!

like image 973
Samui Avatar asked Feb 17 '11 00:02

Samui


1 Answers

If you want custom borders, you'll need to draw them yourself in -drawRect:.

like image 116
Lily Ballard Avatar answered Nov 12 '22 02:11

Lily Ballard