How to round the corners of a button

前端 未结 15 710
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 06:54

I have a rectangle image (jpg) and want to use it to fill the background of a button with rounded corner in xcode.

I wrote the following:

UIButton *b         


        
15条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 07:24

    If you want a rounded corner only to one corner or two corners, etc... read this post:

    [ObjC] – UIButton with rounded corner - http://goo.gl/kfzvKP

    It's a XIB/Storyboard subclass. Import and set borders without write code.

提交回复
热议问题