Set background color for only part of UIView

前端 未结 6 2573
生来不讨喜
生来不讨喜 2021-02-20 09:33

I want the bottom (not quite half) of my UIView to be a different color than the top.

I\'m wondering if I should create a CGRect and then color that? Is this along the r

6条回答
  •  时光说笑
    2021-02-20 10:09

    You can do a CGRect and clip a part of a portion to fill.

    But why won't try two different UIViews placed next to each other?

    Bharath

提交回复
热议问题