4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

swift ボタンの角を丸くする

Posted at

#ボタンを角を丸くするコード
スクリーンショット 2019-05-05 23.43.44.png

##形式
UIButtonの変数名.layer.cornerRadius = 角丸の大きさ

##例

   @IBOutlet weak var startButton: UIButton!

    override func viewDidLoad() {
        super.viewDidLoad()
       
        startButton.layer.cornerRadius = 10.0
        
    }

上のコードではstartButtonというUIButtonの角を大きさ10にして丸くしてます。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?