{"id":2676,"date":"2018-08-09T12:47:00","date_gmt":"2018-08-09T03:47:00","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2676"},"modified":"2018-08-09T13:03:19","modified_gmt":"2018-08-09T04:03:19","slug":"swift4-%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%a8%e3%83%a9%e3%83%99%e3%83%ab%e3%81%ae%e3%82%b3%e3%83%bc%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2676","title":{"rendered":"Swift4 \u30dc\u30bf\u30f3\u3068\u30e9\u30d9\u30eb\u306e\u30b3\u30fc\u30c9"},"content":{"rendered":"<p>\u899a\u3048\u66f8\u304d\u3002<\/p>\n<p>[objc]<br \/>\n    override func viewDidLoad() {<br \/>\n        super.viewDidLoad()<br \/>\n        \/\/ Label<br \/>\n        let countLbl = UILabel()<br \/>\n        countLbl.text = &quot;\u30e9\u30d9\u30eb&quot;<br \/>\n        countLbl.textAlignment = .center<br \/>\n        countLbl.textColor = UIColor.blue<br \/>\n        countLbl.frame = CGRect(x: (self.view.frame.width-110)\/2, y: 150, width: 110, height: 21)<\/p>\n<p>        \/\/ Button<br \/>\n        let countUpBtn = UIButton()<br \/>\n        countUpBtn.frame = CGRect(x: (self.view.frame.width-100)\/2, y: 200, width: 100, height: 30)<br \/>\n        countUpBtn.layer.borderWidth = 1.0<br \/>\n        countUpBtn.layer.borderColor = UIColor.blue.cgColor<br \/>\n        countUpBtn.layer.cornerRadius = 5.0<br \/>\n        countUpBtn.setTitleColor(UIColor.blue, for: .normal)<br \/>\n        countUpBtn.setTitle(&quot;\u30dc\u30bf\u30f3&quot;, for: .normal)<br \/>\n        countUpBtn.addTarget(self, action: #selector(ViewController.countUp(_:)), for: UIControlEvents.touchUpInside)<\/p>\n<p>        self.view.addSubview(countLbl)<br \/>\n        self.view.addSubview(countUpBtn)<\/p>\n<p>    }<br \/>\n[\/objc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u899a\u3048\u66f8\u304d\u3002 [objc] override func viewDidLoad() { super.viewDidLoad() \/\/ Label let countLbl = UILabel() countLbl.text [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[47,50,4],"tags":[],"class_list":["post-2676","post","type-post","status-publish","format-standard","hentry","category-swift","category-xcode","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2676"}],"version-history":[{"count":2,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2676\/revisions"}],"predecessor-version":[{"id":2684,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2676\/revisions\/2684"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}