{"id":11563,"date":"2024-02-07T17:29:28","date_gmt":"2024-02-07T08:29:28","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=11563"},"modified":"2024-02-09T10:01:38","modified_gmt":"2024-02-09T01:01:38","slug":"uikit%e3%81%a8swiftui%e3%80%81%e3%81%a9%e3%81%a1%e3%82%89%e3%82%92%e4%bd%bf%e3%81%86%e3%81%b9%e3%81%8d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.ecomottblog.com\/?p=11563","title":{"rendered":"UIKit\u3068SwiftUI\u3001\u3069\u3061\u3089\u3092\u4f7f\u3046\u3079\u304d\uff1f"},"content":{"rendered":"<p><span style=\"font-weight: 400\">\u3053\u3093\u306b\u3061\u306f\uff01\u30af\u30e9\u30a6\u30c9\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u90e8\u306e\u4eca\u91ce\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u79c1\u81ea\u8eab\u3001Swift\u3067\u958b\u767a\u3092\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001\u4eca\u56de\u306fSwift\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">Swift\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u306f\u8272\u3005\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u4ee3\u8868\u7684\u306a\u3082\u306e\u3068\u3057\u30662\u3064\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u304a\u305d\u3089\u304fiPhone\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3057\u3066\u3044\u308b\u65b9\u3067\u3042\u308c\u3070\u805e\u3044\u305f\u3053\u3068\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u305d\u306e\u540d\u3082<\/span><\/p>\n<p><strong>UIKit\u3068SwiftUI<\/strong>\u3067\u3059\u3002<\/p>\n<p><span style=\"font-weight: 400\">\u6700\u8fd1\u306f\u300c\u6642\u4ee3\u306f\u5909\u308f\u308c\u3069\u5b9f\u7e3e\u306e\u3042\u308bUIKit\u306f\u5065\u5728\uff01\u300d\u300c\u5c06\u6765\u306b\u6295\u8cc7\u3059\u308b\u305f\u3081\u306bSwiftUI\u3092\u4f7f\u304a\u3046\uff01\u300d\u300c\u7d50\u5c40\u3069\u3061\u3089\u3092\u4f7f\u3048\u3070\u826f\u3044\u3093\u3060\u30fc\u3063\uff01\u300d\u3068\u3044\u3046\u8a71\u304c\u3088\u304f\u51fa\u3066\u304d\u307e\u3059\u304c\u3001<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u5927\u5207\u306a\u306e\u306f\u7528\u9014\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><del><span style=\"font-weight: 400\">\u6728\u5de5\u7528\u30dc\u30f3\u30c9\u3067\u30d7\u30e9\u30b9\u30c1\u30c3\u30af\u306e\u30d1\u30fc\u30c4\u3092\u63a5\u5408\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u306e\u3068\u540c\u3058(\u5b9f\u4f53\u9a13)<\/span><\/del><\/p>\n<p><span style=\"font-weight: 400\">\u305d\u3053\u3067\u4eca\u56de\u306f\u3001UIKit\u3068SwiftUI\u306e\u30e1\u30ea\u30c3\u30c8\u3068\u30c7\u30e1\u30ea\u30c3\u30c8\u3092\u6319\u3052\u3066\u3044\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">Swift\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u691c\u8a0e\u4e2d\u306e\u65b9\u3001\u5fc5\u898b\u3067\u3059\u3002<\/span><br \/>\n&nbsp;<!--more--><\/p>\n<h2>~UIKit~<\/h2>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li><span style=\"font-weight: 400\">SwiftUI\u3088\u308a\u4ee5\u524d\u306b\u958b\u767a\u3055\u308c\u305f\u8a00\u8a9e<\/span><\/li>\n<li><span style=\"font-weight: 400\">Storyboard\u3092\u7528\u3044\u3066\u76f4\u611f\u7684\u306a\u958b\u767a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b<\/span><\/li>\n<li><span style=\"font-weight: 400\">\u904e\u53bb\u306b\u305f\u304f\u3055\u3093\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3066\u304d\u305f\u5b9f\u7e3e\u304c\u3042\u308b<\/span><\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li><span style=\"font-weight: 400\">\u5834\u5408\u306b\u3088\u3063\u3066\u306fObjective-C\u3092\u4f7f\u3046\u3053\u3068\u3082\u3042\u308a\u3001\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u53d6\u3063\u639b\u304b\u308a\u3068\u3057\u3066\u306f\u6577\u5c45\u304c\u9ad8\u3044\u53ef\u80fd\u6027\u304c\u3042\u308b<\/span><\/li>\n<li><span style=\"font-weight: 400\">AutoLayout\u3067\u95d8\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b(\u4fbf\u5229\u306a\u3082\u306e\u306f\u8af8\u5203\u306e\u5263\u3002\u8a73\u3057\u304f\u306f\u5225\u8a18\u4e8b\u306e\u969b\u306b\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059)<\/span><\/li>\n<\/ul>\n<h3>\u3053\u3093\u306a\u4eba\u306b\u306f\u304a\u3059\u3059\u3081<\/h3>\n<ul>\n<li><span style=\"font-weight: 400\">\u73fe\u6642\u70b9\u3067\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u7528\u3044\u305f\u958b\u767a\u3092\u884c\u3046\u4e88\u5b9a\u3067\u3042\u308b(\u3053\u3053\u91cd\u8981)<\/span><\/li>\n<li><span style=\"font-weight: 400\">\u5927\u898f\u6a21\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u59cb\u3081\u308b\u4e88\u5b9a\u3067\u3042\u308b<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">UIKit\u306fSwiftUI\u306b\u6bd4\u3079\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u65b9\u3005\u304c\u84c4\u7a4d\u3057\u3066\u304d\u305f\u30ce\u30a6\u30cf\u30a6\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306b\u305f\u304f\u3055\u3093\u8ee2\u304c\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u305d\u308c\u3092\u983c\u308a\u306b\u958b\u767a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u305d\u3057\u3066\u69d8\u3005\u306a\u5927\u898f\u6a21\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3055\u308c\u3066\u304d\u305f\u5b9f\u7e3e\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u304c\u3057\u304b\u3057\u3001Storyboard\u306f\u3084\u3084\u7656\u3082\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u76f4\u611f\u7684\u306b\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u305f\u308a\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3055\u305b\u305f\u308a\u3067\u304d\u307e\u3059\u304c\u3001\u30b3\u30fc\u30c9\u3068\u3057\u3066\u8a18\u8ff0\u3057\u306a\u3044\u5206\u3001\u6df7\u4e71\u3059\u308b\u3053\u3068\u3082&#8230;\u6163\u308c\u304c\u5fc5\u8981\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/span><\/p>\n<h2>~SwiftUI~<\/h2>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u5c06\u6765\u6027\u304c\u975e\u5e38\u306b\u9ad8\u3044<\/li>\n<li><span style=\"font-weight: 400\">\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3067\u958b\u767a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b<\/span><\/li>\n<li><span style=\"font-weight: 400\">\u30b3\u30fc\u30c9\u304c\u5197\u9577\u306b\u306a\u308a\u306b\u304f\u3044(\u7c21\u6f54\u306a\u30b3\u30fc\u30c9\u304c\u66f8\u304d\u3084\u3059\u3044)<\/span><\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li><span style=\"font-weight: 400\">\u307e\u3060\u958b\u767a\u5b9f\u7e3e\u304c\u5c11\u306a\u3044\u305f\u3081\u3001\u624b\u63a2\u308a\u3067\u958b\u767a\u3092\u884c\u3046\u3053\u3068\u304c\u3042\u308b<\/span><\/li>\n<li><span style=\"font-weight: 400\">\u73fe\u6bb5\u968e\u3067\u306f\u5b9f\u88c5\u3067\u304d\u306a\u3044\u6a5f\u80fd\u304c\u3042\u308b(WebView\u306f\u305d\u306e\u4e00\u4f8b)<\/span><\/li>\n<\/ul>\n<h3>\u3053\u3093\u306a\u4eba\u306b\u306f\u304a\u3059\u3059\u3081<\/h3>\n<ul>\n<li><span style=\"font-weight: 400\">Apple\u306e\u30c8\u30ec\u30f3\u30c9\u306b\u6cbf\u3063\u3066\u958b\u767a\u3092\u3057\u3066\u3044\u304d\u305f\u3044<\/span><\/li>\n<li><span style=\"font-weight: 400\">UI\u4f5c\u6210\u3092\u30e1\u30a4\u30f3\u3067\u3084\u3063\u3066\u3044\u304d\u305f\u3044<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">SwiftUI\u306fUIKit\u306b\u6bd4\u3079\u3001\u8a00\u8a9e\u304c\u516c\u958b\u3055\u308c\u3066\u304b\u3089\u307e\u3060\u6b74\u53f2\u304c\u77ed\u3044\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u305d\u306e\u305f\u3081\u3001\u904e\u53bb\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u308f\u308c\u3066\u304d\u305f\u5b9f\u7e3e\u304c\u5c11\u306a\u3044\u3068\u8a00\u3048\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u7c21\u5358\u306aUI\u3092\u4f5c\u308b\u4e0a\u3067\u306f\u3001UIKit\u3088\u308a\u3082\u5bb9\u6613\u306b\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u958b\u767a\u3059\u308b\u6642\u306b\u306f\u624b\u63a2\u308a\u3057\u306a\u304c\u3089\u958b\u767a&#8230;\u3068\u3044\u3046\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3082\u3042\u308a\u3048\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u3067\u3059\u304c\u3001\u5c06\u6765\u7684\u306bSwiftUI\u306b\u79fb\u884c\u3059\u308b\u3068\u3044\u3046\u8a71\u3082\u3042\u308b\u305f\u3081\u3001\u5c06\u6765\u3078\u306e\u6295\u8cc7\u3068\u3044\u3046\u610f\u5473\u3067SwiftUI\u3092\u9078\u3076\u3068\u3044\u3046\u9078\u629e\u80a2\u3082\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<h2>\u6700\u5f8c\u306b<\/h2>\n<p><span style=\"font-weight: 400\">UIKit\u3068SwiftUI\u305d\u308c\u305e\u308c\u306e\u30e1\u30ea\u30c3\u30c8\u3068\u30c7\u30e1\u30ea\u30c3\u30c8\u3092\u6319\u3052\u3066\u307f\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u3044\u304b\u304c\u3060\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u3061\u306a\u307f\u306b\u79c1\u81ea\u8eab\u3001UIKit\u3068SwiftUI\u3092\u3069\u3061\u3089\u3082\u89e6\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001UIKit\u3068SwiftUI\u306e\u66f8\u304d\u65b9\u306f\u5168\u304f\u306e\u5225\u7269\u3067\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">(UIKit\u306b\u306fViewDidLoad\u3068\u3044\u3046<\/span><span style=\"font-weight: 400\">view\u3092<\/span><span style=\"font-weight: 400\">\u30e1\u30e2\u30ea\u306b\u30ed\u30fc\u30c9\u3057\u305f\u5f8c\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9<\/span><span style=\"font-weight: 400\">\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001SwiftUI\u3067\u306fonAppear\u3092\u4f7f\u3046\u306a\u3069)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u30b3\u30fc\u30c9\u306e\u8a18\u8ff0\u306b\u95a2\u3057\u3066\u3082\u69cb\u9020\u81ea\u4f53\u304c\u7570\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u305f\u3060\u3001\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f\u9055\u3048\u3069\u3082\u30d9\u30fc\u30b9\u306fSwift\u306a\u306e\u3067\u57fa\u672c\u7684\u306a\u8868\u8a18\u306a\u3069\u306f\u540c\u3058\u3067\u3059\u306d\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u4eca\u56de\u306e\u8a18\u4e8b\u304c\u53c2\u8003\u306b\u306a\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u6700\u5f8c\u307e\u3067\u898b\u3066\u3044\u305f\u3060\u304d\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\uff01<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u30af\u30e9\u30a6\u30c9\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u90e8\u306e\u4eca\u91ce\u3067\u3059\u3002 \u79c1\u81ea\u8eab\u3001Swift\u3067\u958b\u767a\u3092\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001\u4eca\u56de\u306fSwift\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002 Swift\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u306f\u8272\u3005\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u4ee3\u8868\u7684\u306a\u3082\u306e [&hellip;]<\/p>\n","protected":false},"author":116,"featured_media":11573,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[100,101,104],"_links":{"self":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11563"}],"collection":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/116"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11563"}],"version-history":[{"count":23,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11563\/revisions"}],"predecessor-version":[{"id":11604,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11563\/revisions\/11604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/11573"}],"wp:attachment":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}