{"id":1388,"date":"2012-09-04T08:00:00","date_gmt":"2012-09-03T23:00:00","guid":{"rendered":"http:\/\/www.hawk-a.com\/exception_code\/?p=1388"},"modified":"2013-09-06T15:31:57","modified_gmt":"2013-09-06T06:31:57","slug":"xcode4-4uisplitviewcontroller%e2%86%92uiviewcontroller-splitview%e3%81%8b%e3%82%891%e3%81%a4%e3%81%ae%e3%83%93%e3%83%a5%e3%83%bc%e3%81%ab%e9%81%b7%e7%a7%bb%e3%81%95%e3%81%9b%e3%82%8b%e6%96%b9","status":"publish","type":"post","link":"http:\/\/www.hawk-a.com\/exception_code\/archives\/1388","title":{"rendered":"[XCode]UISplitViewController\u304b\u3089UIViewController SplitView\u304b\u30891\u3064\u306e\u30d3\u30e5\u30fc\u306b\u9077\u79fb\u3055\u305b\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" title=\"MasterDetail.xcodeproj \u2014 MainStoryboard.storyboard-5.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/09\/1146d84f126d2c90270088944ed63194.png\" alt=\"MasterDetail xcodeproj  MainStoryboard storyboard 5\" width=\"500\" height=\"336\" border=\"0\" \/><\/p>\n<p>\u6628\u65e5\u306b\u5f15\u304d\u7d9a\u304d\u3002<\/p>\n<p><a href=\"http:\/\/www.hawk-a.com\/exception_code\/archives\/1383\">[XCode4.4]UIViewController\u2192UISplitViewController 1\u3064\u306e\u30d3\u30e5\u30fc\u304b\u3089SplitView\u306b\u9077\u79fb\u3055\u305b\u308b\u65b9\u6cd5<\/a><\/p>\n<p>\u4e0a\u306e\u8a18\u4e8b\u3067\u306fUIViewController\u304b\u3089UISplitViewController\u3078\u9077\u79fb\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u9006\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a2\u30a6\u30c8\u51e6\u7406\u306a\u3093\u304b\u306b\u5f79\u7acb\u3064\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u30ab\u30b9\u30bf\u30e0Segue\u3067\u89e3\u6c7a<\/h3>\n<p>\u4eca\u56de\u3082\u4e0a\u306e\u8a18\u4e8b\u3068\u540c\u69d8\u306b\u30ab\u30b9\u30bf\u30e0Segue\u3092\u4f5c\u3063\u3066\u3084\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fSplitView\u306eDetailView\u306e\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30d0\u30fc\u304b\u3089UIView\u306b\u623b\u308b\u51e6\u7406\u3092\u5b9f\u88c5\u4f8b\u306b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"MasterDetail.xcodeproj \u2014 MainStoryboard.storyboard-7.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/09\/f8c89c701648f5b59b64cb3334b54f12.png\" alt=\"MasterDetail xcodeproj  MainStoryboard storyboard 7\" width=\"500\" height=\"346\" border=\"0\" \/><\/p>\n<p>DetailView\u306b\u306fBarButtonItem\u3092\u3002\u305d\u3053\u304b\u3089Action\u3092Custom\u306b\u3057\u305fSegue\u3092UIViewController\u3078\u7e4b\u3052\u3070\u6e96\u5099\u5b8c\u4e86\u3002<\/p>\n<p>\u305d\u3057\u3066\u524d\u56de\u540c\u69d8File\u2192New\u2192File\u2192Objective-C class\u3067UIStoryboardSegue\u3092\u30b5\u30d6\u30af\u30e9\u30b9\u306b\u3057\u3066\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u53c2\u7167\u3002<\/p>\n<p>\u4eca\u56de\u306fViewFlipSegue\u3068\u3044\u3046\u540d\u524d\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Xcode-1.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/09\/bloggerXcode-1.png\" alt=\"Xcode 1\" width=\"500\" height=\"340\" border=\"0\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u305d\u3057\u3066\u3067\u304d\u305fViewFlipSegue.m\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3002<\/p>\n<p>ViewFlipSegue.m<\/p>\n<pre class=\"prettyprint\">\r\n#import &quot;ViewFlipSegue.h&quot;\r\n\r\n@implementation ViewFlipSegue\r\n\r\n- (void)perform {\r\n    \/\/sourceViewController:\u9077\u79fb\u524d\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\r\n    \/\/destinationViewController:\u9077\u79fb\u5f8c\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\r\n    UIViewController *sourceViewController = (UIViewController *)self.sourceViewController;\r\n    UIViewController *destinationViewController = (UIViewController *)self.destinationViewController;\r\n    \r\n    UIWindow *window = [UIApplication sharedApplication].keyWindow;\r\n    \/\/ \u4e00\u5ea6\u8cbcroot\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u56de\u8ee2\u65b9\u5411\u306e\u4fee\u6b63\r\n    window.rootViewController = destinationViewController;\r\n    window.rootViewController = sourceViewController;\r\n    \r\n    [UIView transitionWithView:sourceViewController.view.window\r\n                      duration:0.5\r\n                       options:UIViewAnimationOptionTransitionFlipFromLeft\r\n                    animations:^{\r\n                        window.rootViewController = destinationViewController;\r\n                    }\r\n                    completion:^(BOOL finished){\r\n                        \/\/\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u7d42\u4e86\u5f8c\u306e\u51e6\u7406\r\n                    }];\r\n}\r\n\r\n@end\r\n<\/pre>\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u4e0a\u624b\u304fUIView\u306b\u753b\u9762\u9077\u79fb\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u304b\u3089\u3061\u3087\u3063\u3068\u624b\u3092\u52a0\u3048\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/cheesememo.blog39.fc2.com\/blog-entry-465.html\">\u30c1\u30fc\u30ba\u304f\u3093\u306e\u5099\u5fd8\u9332 [iOS]UIViewController\u304b\u3089UISplitViewController\u3078\u9077\u79fb\u3059\u308b\u305f\u3081\u306e\u306eSegue<\/a><\/p>\n<p>\u611f\u8b1d\u3002<\/p>\n<p>UIView\u306b\u623b\u308b\u3068\u304d\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u4f5c\u52d5\u3057\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u3066\u3001\u3061\u3087\u3063\u3068\u539f\u56e0\u306f\u308f\u304b\u3089\u306a\u3044\u3093\u3067\u3059\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u306f\u3053\u308c\u3067\u4e0a\u624b\u304f\u3044\u304d\u305d\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6628\u65e5\u306b\u5f15\u304d\u7d9a\u304d\u3002 [XCode4.4]UIViewController\u2192UISp &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2108,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[365],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts\/1388"}],"collection":[{"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/comments?post=1388"}],"version-history":[{"count":1,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts\/1388\/revisions"}],"predecessor-version":[{"id":2119,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts\/1388\/revisions\/2119"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/media\/2108"}],"wp:attachment":[{"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/media?parent=1388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/categories?post=1388"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/tags?post=1388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}