开发者

UISegmentedlControl with using BAR style but with square/rectangular corners?

Is there a simple way to get non-rounded corners on a UISegmentedControl item?

I have created a custom momentary UISegmentedControl button through code which开发者_如何学编程 uses the bar style but I would like to to have sharp square like corners (ie. non-rounded) ??

Is this easily possible through code or do I have to sub-class UISegementedControl ??

I've tried accessing the layer property of my UISegementedControl button to modify the CornerRadius setting but this has no effect at all :)

Thanks in advance!


Not sure if this answer is appreciated.

Keep your segmented control inside a view i.e. as a subview. And give the view's width and height little less than that of segmented control, so as to clip its rounded corners.

UISegmentedlControl with using BAR style but with square/rectangular corners?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜