{"id":682,"date":"2021-09-17T15:21:20","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=682"},"modified":"2021-09-17T15:21:20","modified_gmt":"1970-01-01T00:00:00","slug":"post-682","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=682","title":{"rendered":"Swift\u3067UIButton\u3092\u89d2\u4e38\u306b(Corner radius)\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u306f\u3044\u3001\u307f\u3093\u306a\u5927\u597d\u304d\u89d2\u4e38\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u307f\u3093\u306a\u5927\u597d\u304d\u306a\u3093\u3067\u3001StoryBoard\u4e0a\u3067\u3082\u3067\u304d\u308b\u3088\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift\u3067UIButton\u3092\u89d2\u4e38\u306b(Corner radius)\u3059\u308b<\/h3>\n<pre class=\"lang:swift decode:true\">import UIKit\r\n\r\nclass ViewController: UIViewController {\r\n\r\n    @IBOutlet weak var button: UIButton!\r\n    \r\n    override func viewDidLoad() {\r\n        super.viewDidLoad()\r\n        \r\n        button.backgroundColor = UIColor.blue \/\/ \u80cc\u666f\u8272\r\n        button.layer.borderWidth = 2.0 \/\/ \u67a0\u7dda\u306e\u5e45\r\n        button.layer.borderColor = UIColor.red.cgColor \/\/ \u67a0\u7dda\u306e\u8272\r\n        button.layer.cornerRadius = 10.0 \/\/ \u89d2\u4e38\u306e\u30b5\u30a4\u30ba\r\n        button.setTitleColor(UIColor.white,for: UIControlState.normal) \/\/ \u30bf\u30a4\u30c8\u30eb\u306e\u8272\r\n    }\r\n}<\/pre>\n<p>\u3053\u306e\u306a\u304b\u3067\u5fc5\u8981\u306a\u3082\u306e\u3060\u3051\u4f7f\u3048\u3070\u3044\u3044\u3088\u3002<\/p>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3060\u3068\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308b\u3088\u3002<\/p>\n<p><a href=\"https:\/\/swift.tecc0.com\/wp-content\/uploads\/2016\/12\/d48cfc437dc4f385442ef4a1ea017a26.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-683\" src=\"https:\/\/swift.tecc0.com\/wp-content\/uploads\/2016\/12\/d48cfc437dc4f385442ef4a1ea017a26.png\" alt=\"\u89d2\u4e38\u306aUIButton\" width=\"328\" height=\"108\" srcset=\"https:\/\/swift.tecc0.com\/wp-content\/uploads\/2016\/12\/d48cfc437dc4f385442ef4a1ea017a26.png 328w, https:\/\/swift.tecc0.com\/wp-content\/uploads\/2016\/12\/d48cfc437dc4f385442ef4a1ea017a26-300x99.png 300w\" sizes=\"(max-width: 328px) 100vw, 328px\" \/><\/a><\/p>\n<p>\u900f\u660e\u3067OK\u306a\u3082\u306e\u306f\u7279\u306b\u66f8\u304f\u5fc5\u8981\u306f\u306a\u3044\u3088\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4f59\u8ac7\u3060\u3051\u3069iOS\u306b\u6163\u308c\u3066\u3001\u4f55\u6c17\u306bAndroid\u958b\u767a\u8005\u306b\u300c\u3053\u3053\u89d2\u4e38\u3067\u304a\u9858\u3044\u306d\u300d\u3068\u304b\u6c17\u697d\u306b\u8a00\u3046\u3068\u6bb4\u3089\u308c\u308b\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001\u6ce8\u610f\u3057\u3088\u3046\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3044\u3001\u307f\u3093\u306a\u5927\u597d\u304d\u89d2\u4e38\u3067\u3059\u3002 \u3053\u308c\u306f\u307f\u3093\u306a\u5927\u597d\u304d\u306a\u3093\u3067\u3001StoryBoard\u4e0a\u3067\u3082\u3067\u304d\u308b\u3088\u3002 &nbsp; Swift\u3067UIButton\u3092\u89d2\u4e38\u306b(Corner radius)\u3059\u308b import UIKit class V&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/682"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=682"}],"version-history":[{"count":1,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions"}],"predecessor-version":[{"id":684,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions\/684"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}