5

Possible Duplicates:
UIView with rounded corners
Round two corners in UIView

I'm aware of means for rounding all four corners of a UIView, but how could I round only the bottom corners of a view?

Community
  • 1
  • 1
aryaxt
  • 76,198
  • 92
  • 293
  • 442

2 Answers2

1

To achieve this, you need to use CALayer masking. This question Just two rounded corners? and the accepted answer should get you started. If you run in to trouble, then you should take a look at this follow-up post: Round two corners in UIView

Community
  • 1
  • 1
PengOne
  • 48,188
  • 17
  • 130
  • 149
1

You can draw in one CALayer filled rectangle with bottom rounded corners and than set it as mask to your:

[[view layer] setMask:calayerWithDrawedMaskingRect];
Serhii Mamontov
  • 4,942
  • 22
  • 26