Setting multiple borders on UIView

后端 未结 5 452
庸人自扰
庸人自扰 2021-01-13 17:39

As I cannot find any questions/answers for this, I imagine it is not possible.

Is there anyway to set multiple borders on a UIView.

I am curren

5条回答
  •  生来不讨喜
    2021-01-13 18:31

    Three solutions I can think of:

    • nest a UIView in another one, define one border for each;
    • draw the border yourself in -(void)drawRect;
    • use an UIImageView with a resizable; stretchable image of your borders as background (the best solution performance-wise).

提交回复
热议问题