{"id":267,"date":"2017-10-19T14:19:45","date_gmt":"2017-10-19T05:19:45","guid":{"rendered":"https:\/\/jidouka.work\/?p=267"},"modified":"2017-10-19T14:38:40","modified_gmt":"2017-10-19T05:38:40","slug":"%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92iphone-x%e3%81%ab%e5%af%be%e5%bf%9c%e3%81%95%e3%81%9b%e3%82%8b%ef%bc%88admob%e7%b7%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/jidouka.work\/?p=267","title":{"rendered":"\u30a2\u30d7\u30ea\u3092iPhone X\u306b\u5bfe\u5fdc\u3055\u305b\u308b\uff08AdMob\u7de8\uff09"},"content":{"rendered":"<p>\u3088\u3053\u306d\u3063\u3068\u306e\u30a2\u30d7\u30ea\u3067\u3042\u308bFlash Photos\u306f\u8a2d\u5b9a\u753b\u9762\u306e\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u306e\u30bb\u30eb\u306bGoogle\u306e\u5e83\u544a\u3067\u3042\u308bAdMob\u3092\u57cb\u3081\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<br \/>\n\u8ab0\u306b\u3082\u7c21\u5358\u306b\u4f7f\u7528\u3067\u304d\u308b\u5e83\u544a\u3067\u3042\u308a\u3001\u591a\u304f\u306e\u30a2\u30d7\u30ea\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>iPhone X\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u3067AdMob\u3092\u8868\u793a\u3059\u308b\u3068\u3001\u7e26\u4f4d\u7f6e\u3067\u306f\u554f\u984c\u306a\u304f\u753b\u9762\u306e\u5e45\u3067\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/9d9d26025b70c0df1445c8d40021c231.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/9d9d26025b70c0df1445c8d40021c231.jpg\" alt=\"\" width=\"477\" height=\"912\" class=\"alignnone size-full wp-image-263\" srcset=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/9d9d26025b70c0df1445c8d40021c231.jpg 477w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/9d9d26025b70c0df1445c8d40021c231-157x300.jpg 157w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<p>\u3057\u304b\u3057\u3001\u6a2a\u4f4d\u7f6e\u3060\u3068\u5e83\u544a\u304cSafeArea\u3092\u306f\u307f\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/ffb36e683c3e0369a7b468035ddf714e.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/ffb36e683c3e0369a7b468035ddf714e.jpg\" alt=\"\" width=\"885\" height=\"518\" class=\"alignnone size-full wp-image-268\" srcset=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/ffb36e683c3e0369a7b468035ddf714e.jpg 885w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/ffb36e683c3e0369a7b468035ddf714e-300x176.jpg 300w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/ffb36e683c3e0369a7b468035ddf714e-768x450.jpg 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/a><\/p>\n<p>\u3053\u308c\u306f\u5e83\u544a\u81ea\u4f53\u306e\u9577\u3055\u306f\u753b\u9762\u306e\u6a2a\u5e45\u3068\u540c\u3058\u306a\u306e\u3067\u3059\u304c\u3001\u5de6\u5074\u306eSafeArea\u304cView\u306eRect\u306e\u59cb\u307e\u308a\u3068\u306a\u3063\u3066\u304a\u308a\u3001\u305d\u306e\u307e\u307e\u53f3\u5074\u306e\u65b9\u304cSafeArea\u304b\u3089\u7a81\u304d\u629c\u3051\u3066\u3044\u308b\u305f\u3081\u306b\u3053\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3057\u305f\u304c\u3063\u3066\u753b\u9762\u304c\u3069\u306e\u65b9\u5411\u3067\u3042\u3063\u3066\u3082SafeArea\u5185\u306b\u5e83\u544a\u3092\u8868\u793a\u3092\u53ce\u3081\u308b\u3088\u3046\u306b\u4fee\u6b63\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>AdMob\u306eiPhone X\u3078\u306e\u5bfe\u5fdc\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>iPhone X Ad Rendering \u00a0|\u00a0 AdMob for iOS \u00a0|\u00a0 Google Developers<br \/>\n<a href=\"https:\/\/developers.google.com\/admob\/ios\/x-ad-rendering\">https:\/\/developers.google.com\/admob\/ios\/x-ad-rendering<\/a><\/p>\n<h2>Storyboard\u3067\u306e\u8a2d\u5b9a\u306b\u5909\u66f4<\/h2>\n<p>\u4eca\u307e\u3067\u306f\u30b3\u30fc\u30c9\u3067AdMob\u306eView\u3092\u4f5c\u3063\u3066\u30bb\u30eb\u306eView\u306b\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3044\u3046\u65b9\u6cd5\u3067\u5e83\u544a\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3001\u4eca\u56de\u304b\u3089\u306fStoryboard\u3067GADBannerView\u3092\u8cbc\u308a\u4ed8\u3051\u3066@IBOutlet\u3067\u30b3\u30fc\u30c9\u304b\u3089\u5236\u5fa1\u3059\u308b\u65b9\u6cd5\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782-1024x643.jpg\" alt=\"\" width=\"790\" height=\"496\" class=\"alignnone size-large wp-image-269\" srcset=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782-1024x643.jpg 1024w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782-300x188.jpg 300w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782-768x482.jpg 768w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/f0733731a3c67d5dd7bf65af16f33782.jpg 1826w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/a><\/p>\n<p>UITableView\u306e\u30bb\u30eb\u306b\u5e83\u544a\u3092\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001UIView\u3092\u30bb\u30eb\u306e\u4e2d\u306b\u914d\u7f6e\u3057\u3066Class\u3092GADBannerView\u306b\u3057\u307e\u3059\u3002<br \/>\nAutoLayout\u306eConstraint\u306f\u4ee5\u4e0b\u306e4\u3064\u3092\u8ffd\u52a0\u3057\u3066\u30bb\u30eb\u306e\u5927\u304d\u3055\u306b\u5408\u308f\u305b\u3066\u4e2d\u592e\u306b\u8868\u793a\u3067\u3059\u3002<\/p>\n<ul>\n<li>Banner View.leading = leading<\/li>\n<li>Banner View.centerY = centerY<\/li>\n<li>trailing = Banner View.trailing<\/li>\n<li>Banner View.top = top<\/li>\n<\/ul>\n<figure class=\"jd-code\"><figcaption>AdMob Code<\/figcaption><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-swift\">class FPSettingTableViewController: UITableViewController {\r\n\r\n@IBOutlet var bannerView : GADBannerView?\r\n\r\n\/\/     \u4e2d\u7565\r\n\r\n\/\/AdMob\r\n    func showAd() {\r\n\r\n        \/\/ AdMob\u5e83\u544a\u8a2d\u5b9a\r\n        bannerView?.adSize = kGADAdSizeBanner\r\n        \r\n        \/\/ AdMob\u3067\u767a\u884c\u3055\u308c\u305f\u5e83\u544a\u30e6\u30cb\u30c3\u30c8ID\u3092\u8a2d\u5b9a\uff08\u81ea\u5206\u306e\u30b3\u30fc\u30c9\u3092\u8a2d\u5b9a\uff09\r\n        bannerView?.adUnitID = &quot;ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxx&quot;\r\n\r\n        bannerView?.rootViewController = self\r\n        let gadRequest:GADRequest = GADRequest()\r\n        \r\n        bannerView?.load(gadRequest)\r\n        \r\n    }\r\n}<\/code><\/pre><\/figure>\n<p>Storyboard\u3068\u30b3\u30fc\u30c9\u306e\u5909\u66f4\u5f8c\u306f\u753b\u9762\u3092\u6a2a\u4f4d\u7f6e\u306b\u3057\u3066\u3082\u3001SafeArea\u306e\u5e45\u3067\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/a1fab178f9af95fe80b35dc8c5558260.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/a1fab178f9af95fe80b35dc8c5558260.jpg\" alt=\"\" width=\"626\" height=\"325\" class=\"alignnone size-full wp-image-271\" srcset=\"https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/a1fab178f9af95fe80b35dc8c5558260.jpg 626w, https:\/\/jidouka.work\/wp-content\/uploads\/2017\/10\/a1fab178f9af95fe80b35dc8c5558260-300x156.jpg 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3088\u3053\u306d\u3063\u3068\u306e\u30a2\u30d7\u30ea\u3067\u3042\u308bFlash Photos\u306f\u8a2d\u5b9a\u753b\u9762\u306e\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u306e\u30bb\u30eb\u306bGoogle\u306e\u5e83\u544a &#8230; <\/p>\n","protected":false},"author":1,"featured_media":268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[14,15],"class_list":["post-267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios","tag-iphone","tag-swift"],"_links":{"self":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267"}],"version-history":[{"count":3,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions\/273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/media\/268"}],"wp:attachment":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}