{"id":1545,"date":"2012-01-04T21:38:20","date_gmt":"2012-01-04T12:38:20","guid":{"rendered":"\/\/do-gugan.com\/~furuta\/index.php\/2012\/01\/04\/ios_4\/"},"modified":"2012-01-04T21:38:20","modified_gmt":"2012-01-04T12:38:20","slug":"ios_4","status":"publish","type":"post","link":"https:\/\/do-gugan.com\/~furuta\/archives\/2012\/01\/ios_4.html","title":{"rendered":"iOS\u30a2\u30d7\u30ea\u306e\u5916\u90e8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3067\u5168\u753b\u9762\u8868\u793a\u3067\u304d\u306a\u3044\u6642\u306e\u899a\u3048\u66f8\u304d"},"content":{"rendered":"<p>\u304a\u3084\u3086\u3073\u3067\u304a\u3092Apple Digital AV\u30a2\u30c0\u30d7\u30bf\u30fc\u306a\u3069\u3092\u4f7f\u3063\u3066\u30c6\u30ec\u30d3\u306b\u6620\u305b\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u5e74\u672b\u5e74\u59cb\u306b\u53d6\u308a\u7d44\u3093\u3067\u307e\u3057\u305f\u3002iPad2\u3084iPhone4S\u306e\u3088\u3046\u306b\u30df\u30e9\u30fc\u30ea\u30f3\u30b0\u5bfe\u5fdc\u6a5f\u7a2e\u306a\u3089\u4e00\u5fdc\u6620\u3059\u3053\u3068\u306f\u53ef\u80fd\u3067\u3057\u305f\u304c\u3001\u518d\u751f\u753b\u9762\u304c\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u306b\u306a\u3089\u306a\u304b\u3063\u305f\u308a\u3057\u307e\u3057\u305f\u3057\u3001\u305d\u308c\u4ee5\u5916\u306e\u6a5f\u7a2e\u306e\u3053\u3068\u3082\u8003\u3048\u308b\u3068\u30a2\u30d7\u30ea\u5074\u3067\u304d\u3063\u3061\u308a\u5bfe\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4>\u25a0\u30a2\u30d7\u30ea\u3092\u30b5\u30d6\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u5bfe\u5fdc\u3055\u305b\u308b<\/h4>\n<p>\u672c\u4f53\u30c7\u30d0\u30a4\u30b9\u7528\u306e\u30d9\u30fc\u30b9UIView\u3068\u3057\u3066ViewForMain\u3001\u5916\u90e8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u7528\u3068\u3057\u3066ViewForSub\u3068\u3044\u3046\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n<div class=\"code\">\n<p>if ([[UIScreen screens] count] &gt;1) {      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \/\/\u30b9\u30af\u30ea\u30fc\u30f3\u304c\uff12\u3064\u4ee5\u4e0a\u5b58\u5728\u3059\u308b\uff1d\u5916\u90e8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u6709\u308a       <br \/>&#160;&#160;&#160;&#160;&#160;&#160; UIScreen *secondScreen = [[UIScreen screens] objectAtIndex:1];&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br \/>&#160;&#160;&#160;&#160;&#160;&#160; UIWindow *secondWindow = [[UIWindow alloc] initWithFrame:[secondScreen bounds]];&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br \/>&#160;&#160;&#160;&#160;&#160;&#160; secondWindow.screen = secondScreen;       <br \/>&#160;&#160;&#160;&#160;&#160;&#160; ViewForSub = [[UIView alloc] initWithFrame:[secondScreen bounds]];       <br \/>&#160;&#160;&#160;&#160;&#160;&#160; ViewForSub.backgroundColor = [UIColor blackColor];<\/p>\n<p>&#160;&#160;&#160;&#160;&#160;&#160; \/\/\u4ee5\u4e0b\u3001ViewForSub\u306b\u5fc5\u8981\u306aUI\u90e8\u54c1\u3092addSubview\u3057\u3066\u3044\u304f      <br \/>&#160;&#160;&#160;&#160;&#160;&#160; \/\/\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001ViewForMain\u306bUILabel\u7b49\u3092\u7f6e\u3044\u3066\u300c\u30c6\u30ec\u30d3\u753b\u9762\u51fa\u529b\u4e2d\u300d\u306a\u3069\u3068\u8868\u793a\u3059\u308b       <br \/>&#160;&#160; } else {&#160;&#160;&#160; <br \/>&#160;&#160;&#160;&#160;&#160;&#160; \/\/\u5916\u90e8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u7121\u3057       <br \/>&#160;&#160;&#160;&#160;&#160;&#160; \uff08\u4ee5\u4e0b\u3001ViewForMain\u306b\u5fc5\u8981\u306aUI\u90e8\u54c1\u3092addSubview\u3057\u3066\u3044\u304f\uff09 <\/p>\n<p>&#160;&#160; } <\/p>\n<\/p><\/div>\n<p>[UIScreen screens] cound]\u3067OS\u304c\u8a8d\u8b58\u3057\u3066\u3044\u308b\u30e2\u30cb\u30bf\u306e\u6570\u304c\u308f\u304b\u308b\u306e\u3067\u3001\u305d\u308c\u304c\uff11\u3088\u308a\u591a\u3044\u5834\u5408\u306f\u30b5\u30d6\u30e2\u30cb\u30bf\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001UIScreen\u30af\u30e9\u30b9\u306esecondScreen\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\uff12\u756a\u76ee\uff08objectAtIndex:1\uff09\u3092\u5165\u308c\u3001\u66f4\u306bUIWindows\u3092\u5165\u308c\u3001UIView\u3092\u5165\u308c\u3066\u3084\u308a\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306f\u5168\u3066secondScreen\u306e\u3082\u306e\u3092\u5f15\u304d\u7d99\u3044\u3067\u304a\u304d\u307e\u3059\u3002\u3053\u308c\u3067\u5f8c\u306f\u666e\u901a\u306bUI\u90e8\u54c1\u3092\u914d\u7f6e\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\uff08\u3082\u3061\u308d\u3093UIButton\u7b49\u3092\u7f6e\u3044\u3066\u3082\u62bc\u305b\u307e\u305b\u3093\u304c\uff09\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3053\u3093\u306a\u611f\u3058\u3067\u5916\u90e8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5074\u306b\u8868\u793a\u3067\u304d\u307e\u3057\u305f\u3002\u5b9f\u969b\u306b\u306f\u3001\u30a2\u30d7\u30ea\u8d77\u52d5\u4e2d\u306b\u30a2\u30c0\u30d7\u30bf\u30fc\u304c\u633f\u629c\u3055\u308c\u305f\u306e\u3092\u691c\u77e5\u3057\u3066\u5207\u63db\u51e6\u7406\u3092\u3059\u308b\u7b49\u306e\u4ed5\u7d44\u307f\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u304c\u3053\u3053\u3067\u306f\u5272\u611b\u3002\u3068\u3044\u3046\u304b\u307e\u3060\u672a\u7740\u624b\u2026<\/p>\n<div style=\"float: right\" class=\"amazon\"><a href=\"http:\/\/www.amazon.co.jp\/exec\/obidos\/ASIN\/B004TW8KXE\/doguganprojec-22\/ref=nosim\" target=\"_blank\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/ecx.images-amazon.com\/images\/I\/21iDQKTGPhL._SL160_.jpg\" \/>       <br \/>digital AV Adapter<\/a><\/div>\n<h4>\u25a0\u5168\u753b\u9762\u3067\u8868\u793a\u3055\u308c\u306a\u3044\uff1f<\/h4>\n<p>\u3055\u3066\u305d\u3053\u307e\u3067\u306fApple\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u30d6\u30ed\u30b0\u8a18\u4e8b\u306a\u3069\u3092\u53c2\u8003\u306b\u8fbf\u308a\u7740\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u306a\u305c\u304b\u30d5\u30ebHD\u30e2\u30cb\u30bf\u306b\u63a5\u7d9a\u3057\u305f\u6642\u306b\u5168\u753b\u9762\u8868\u793a\u3055\u308c\u305a\u306b\uff14\u8fba\u306b\u9ed2\u7e01\u304c\u51fa\u3066\u3057\u307e\u3046\u73fe\u8c61\u304c\u767a\u751f\u3002iOS\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u4e0a\u3067\u4eee\u60f31280&#215;720\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u4f7f\u3063\u3066\u3082\u767a\u751f\u3057\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"\/\/do-gugan.com\/~furuta\/Windows-Live-Writer\/47fe9e7bf745_12329\/SDIM0068_2.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"SDIM0068\" border=\"0\" alt=\"SDIM0068\" src=\"\/\/do-gugan.com\/~furuta\/Windows-Live-Writer\/47fe9e7bf745_12329\/SDIM0068_thumb.jpg\" width=\"404\" height=\"271\" \/><\/a><\/p>\n<p>MPMoviePlayer\u306f\u3082\u3068\u3088\u308a\u3001UIWindows\u3084UISreen\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306ebound.size\u3092\u53d6\u3063\u3066\u307f\u3066\u3082\u3061\u3083\u3093\u30681920&#215;1080\u306b\u306a\u3063\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u3067\u3059\u3002\u5199\u771f\u306e\u69d8\u306b\u30dd\u30fc\u30ba\u30a2\u30a4\u30b3\u30f3\u3092\u5ea7\u6a190,0\u3067\u7f6e\u3044\u3066\u307f\u308b\u3068\u3001\u52d5\u753b\u90e8\u5206\u306e\u5de6\u4e0a\u9685\u306b\u6765\u307e\u3059\u3002\u30a2\u30d7\u30ea\u7684\u306b\u306f1920&#215;1080\u3067\u52d5\u753b\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u3064\u3082\u308a\u3063\u307d\u3044\u3002\u30e2\u30cb\u30bf\u5074\u3067\u5165\u529b\u4fe1\u53f7\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3068\u3053\u308c\u307e\u305f1920&#215;1080\u3002\u8a66\u3057\u306b\u624b\u52d5\u3067bound\u30922000&#215;1200\u3068\u304b\u306b\u3059\u308b\u3068\u9ed2\u7e01\u90e8\u5206\u304c\u6e1b\u308a\u307e\u3059\u3002\u3053\u306e\u6570\u5b57\u3092\u3064\u304d\u3064\u3081\u308c\u3070\u30d4\u30c3\u30bf\u30ea\u5168\u753b\u9762\u306b\u306f\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u304c\u3069\u3046\u8003\u3048\u3066\u3082\u62e1\u5927-&gt;\u7e2e\u5c0f\u3068\u30ea\u30b5\u30a4\u30ba\u304c\uff12\u56de\u8d77\u304d\u3066\u7121\u99c4\u3060\u3057\u753b\u8cea\u3082\u640d\u306a\u308f\u308c\u308b\u3067\u3057\u3087\u3046\u3002MPMoviePlayer\u306e\u5168\u753b\u9762\u8868\u793a\u7cfb\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u3042\u308c\u3053\u308c\u3044\u3058\u3063\u3066\u3082\u89e3\u6c7a\u305b\u305a\u3002UIScreen\u3088\u308a\u4e0a\u306e\u968e\u5c64\u3067\u4f55\u304b\u304c\u753b\u9762\u3092\uff11\u5272\u304f\u3089\u3044\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u3057\u3066\u305d\u308c\u30921080p\u3067\u30a2\u30c0\u30d7\u30bf\u30fc\u306b\u9001\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u307e\u3041\u8db3\u304b\u3051\u4e8c\u65e5\u307b\u3069\u60a9\u3093\u3060\u6319\u3052\u53e5\u3001<\/p>\n<p class=\"code\">secondScreen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame;<\/p>\n<p>\u3067\u89e3\u6c7a\u3067\u304d\u307e\u3057\u305f\u3002\u30aa\u30fc\u30d0\u30fc\u30b9\u30ad\u30e3\u30f3\u3068\u3044\u3046\u8a00\u8449\u306b\u3082\u3063\u3068\u65e9\u304f\u601d\u3044\u81f3\u3063\u3066\u3044\u308c\u3070\u691c\u7d22\u3082\u30d2\u30c3\u30c8\u3055\u305b\u3089\u308c\u305f\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002\u3082\u3046\u30a2\u30ca\u30ed\u30b0\u6642\u4ee3\u306e\u8a00\u8449\u3060\u3068\u601d\u3063\u3066\u8a18\u61b6\u306e\u5e95\u306b\u6c88\u3093\u3067\u307e\u3057\u305f\uff57\u3002overscanCompensation\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u306f\uff13\u3064\u306e\u5b9a\u6570\u304c\u3042\u308b\u3093\u3067\u3059\u304c\u3001\u306a\u3093\u3060\u304b\u4e00\u756a\u5168\u753b\u9762\u3063\u307d\u304f\u306a\u3044\u30b3\u30a4\u30c4\u304c\u52dd\u5229\u306e\u9375\u3067\u3057\u305f\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f<a href=\"http:\/\/developer.apple.com\/library\/IOs\/#documentation\/UIKit\/Reference\/UIScreen_Class\/Reference\/UIScreen.html\">\u3053\u3061\u3089<\/a>\u3002iOS5\u304b\u3089\u306e\u5bfe\u5fdc\u307f\u305f\u3044\u3067\u3059\u304c\u3001\u3068\u308a\u3042\u3048\u305aiOS4.3\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3067\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u306a\u3069\u306f\u3057\u306a\u3044\u3088\u3046\u3067\u3059\u304c\u3001iOS4.3\u306e\u5b9f\u6a5f\u3060\u3068\u3082\u3057\u304b\u3059\u308b\u3068\u5168\u753b\u9762\u5316\u3055\u308c\u306a\u3044\u307e\u307e\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"\/\/do-gugan.com\/~furuta\/Windows-Live-Writer\/47fe9e7bf745_12329\/SDIM0067_2.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"SDIM0067\" border=\"0\" alt=\"SDIM0067\" src=\"\/\/do-gugan.com\/~furuta\/Windows-Live-Writer\/47fe9e7bf745_12329\/SDIM0067_thumb.jpg\" width=\"404\" height=\"271\" \/><\/a><\/p>\n<p>\u898b\u4e8b\u3001\u30d5\u30ebHD\u753b\u9762\u3044\u3063\u3071\u3044\u306b\u52d5\u753b\u3092\u518d\u751f\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u4eca\u306e\u3068\u3053\u308d\u65e5\u672c\u8a9e\u3067overscanCompensation\u306b\u95a2\u3057\u3066\u89e6\u308c\u3066\u3044\u308b\u8a18\u4e8b\u306f\u30d2\u30c3\u30c8\u3057\u306a\u305d\u3052\u306e\u3067\u3001\u53c2\u8003\u306b\u7d39\u4ecb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u304a\u3084\u3086\u3073\u3067\u304a\u3092Apple Digital AV\u30a2\u30c0\u30d7\u30bf\u30fc\u306a\u3069\u3092\u4f7f\u3063\u3066\u30c6\u30ec\u30d3\u306b\u6620\u305b\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u5e74\u672b\u5e74\u59cb\u306b\u53d6\u308a\u7d44\u3093\u3067\u307e\u3057\u305f\u3002iPad2\u3084iPhone4S\u306e\u3088\u3046\u306b\u30df\u30e9\u30fc\u30ea\u30f3\u30b0\u5bfe\u5fdc\u6a5f\u7a2e\u306a\u3089\u4e00\u5fdc\u6620\u3059\u3053\u3068\u306f\u53ef\u80fd\u3067\u3057\u305f\u304c\u3001\u518d\u751f\u753b\u9762 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[142],"tags":[],"class_list":["post-1545","post","type-post","status-publish","format-standard","hentry","category-cat190"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/posts\/1545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/comments?post=1545"}],"version-history":[{"count":0,"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/posts\/1545\/revisions"}],"wp:attachment":[{"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/media?parent=1545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/categories?post=1545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/do-gugan.com\/~furuta\/wp-json\/wp\/v2\/tags?post=1545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}