{"id":631,"date":"2010-11-30T15:24:44","date_gmt":"2010-11-30T06:24:44","guid":{"rendered":"http:\/\/yamazon.org\/?p=631"},"modified":"2010-11-30T15:24:44","modified_gmt":"2010-11-30T06:24:44","slug":"4view%e9%96%93%e3%81%a7%e3%81%ae%e7%a7%bb%e5%8b%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/apr20.net\/?p=631","title":{"rendered":"[4]:View\u9593\u3067\u306e\u79fb\u52d5\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u3042\u308bview\u304b\u3089\u4ed6\u306eview\u3078\u79fb\u52d5\u3055\u305b\u308b\u65b9\u6cd5\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002UINavigationController \u3092\u5229\u7528\u3057\u3001<a href=\"http:\/\/yamazon.org\/iphone-app-develop-tips\/538\">\u4ee5\u524d\u306e\u8a18\u4e8b<\/a>\u3067\u5236\u4f5c\u6e08\u306e\u30b3\u30fc\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u524d\u306e\u8a18\u4e8b(\u3068\u3066\u3082\u7c21\u5358\u3067\u3059\u3002)\u3092\u307e\u3060\u8aad\u307e\u308c\u3066\u306a\u3044\u65b9\u306f\u3001\u305d\u3061\u3089\u3092\u8aad\u3093\u3067\u304b\u3089\u3001\u3053\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n<strong> <\/strong><\/p>\n<p><strong>\u4eca\u56de\u5b66\u3076\u3053\u3068\uff1a<\/strong><\/p>\n<ul style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; margin: 0px;\">\n<li style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; margin: 0px;\"><span style=\"color: #008000;\">\u65b0\u898f\u30d3\u30e5\u30fc\u306e\u8ffd\u52a0<\/span><\/li>\n<li style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; margin: 0px;\"><span style=\"color: #008000;\">\u30d3\u30e5\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u8ffd\u52a0\u3059\u308b<\/span><\/li>\n<li style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; margin: 0px;\"><span style=\"color: #008000;\">\u30d3\u30e5\u30fc\u3092\u79fb\u52d5\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a<\/span><\/li>\n<li style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; margin: 0px;\"><span style=\"color: #008000;\">\u30d3\u30e5\u30fc\u3068\u30b3\u30fc\u30c9\u3092\u63a5\u7d9a<\/span><\/li>\n<li style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; margin: 0px;\"><span style=\"color: #008000;\">\u623b\u308b\u30dc\u30bf\u30f3\u3092\u8a2d\u7f6e<\/span><\/li>\n<\/ul>\n<p><!--more-->\u307e\u305a\u3001<a href=\"http:\/\/yamazon.org\/iphone-app-develop-tips\/538\">\u4ee5\u524d\u306b\u3064\u304f\u3063\u305f<\/a>HelloWorld\u30a2\u30d7\u30ea\u3092XCode\u3067\u958b\u304d\u307e\u3059\u3002<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"> [cell.<\/span><span style=\"color: #703daa;\">textLabel<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">setText<\/span><span style=\"color: #000000;\">:<\/span>@&#8221;HelloWorld&#8221;<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\">\u3068\u306a\u3063\u3066\u3044\u308b\u884c\u3092\u4ee5\u4e0b\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/span><\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"> [cell.<\/span><span style=\"color: #703daa;\">textLabel<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">setText<\/span><span style=\"color: #000000;\">:<\/span>@&#8221;NextView&#8221;<span style=\"color: #000000;\">];<\/span><\/p>\n<\/blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"><br \/>\n<\/span><\/p>\n<h4 style=\"font-size: 16px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-weight: bold; letter-spacing: -0.05em; font-family: Arial; color: #008800; padding: 0px;\">\u65b0\u898f\u30d3\u30e5\u30fc\u306e\u8ffd\u52a0<\/h4>\n<p><span style=\"color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-weight: normal; font-size: 13px;\">\u79fb\u52d5\u5f8c\u306b\u8868\u793a\u3055\u308c\u308b\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<strong>RootViewController.xib<\/strong><\/span>\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001Interface Builder \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002File &gt; New \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u5de6\u30da\u30a4\u30f3\u306e\u4e2d\u304b\u3089iOS &gt; view\u3092\u9078\u3073\u3001\u65b0\u898fview\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-635\" title=\"5-1\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-1-300x198.jpg\" alt=\"5-1\" width=\"300\" height=\"198\" \/><\/a><\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\">\u7a7a\u306e\u30d3\u30e5\u30fc\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u306eview\u306e\u4e2d\u306b\u65b0\u3057\u304flabel\u3092\u914d\u7f6e\u3057\u307e\u3059\u3002\u8868\u793a\u3055\u308c\u308b\u30c6\u30ad\u30b9\u30c8\u306f\u300cView2\u300d\u3068\u8a2d\u5b9a\u3057\u307e\u3059\u3002(\u8868\u793a\u3055\u308c\u308b\u30c6\u30ad\u30b9\u30c8\u306f\u304a\u597d\u304d\u306a\u6587\u5b57\u5217\u3067\u304b\u307e\u3044\u307e\u305b\u3093\u3002)<\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\">\u65b0\u3057\u304f\u4f5c\u6210\u3057\u305fView2\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u4fdd\u5b58\u5148\u306f\u3001\u300cHelloWorld\u300d\u30a2\u30d7\u30ea\u3092\u9078\u3073\u3001\u305d\u306e\u5f8c\u306b\u8868\u793a\u3055\u308c\u308b\u78ba\u8a8d\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u4e2d\u306b\u3042\u308b\u3001HelloWorld\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u300cadd\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\">\u4f5c\u6210\u3055\u308c\u305fView2\u3092XCode\u4e0a\u3067Resources\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h4>\u30d3\u30e5\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u8ffd\u52a0\u3059\u308b<\/h4>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\">\u65b0\u3057\u3044view\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u3001\u30d3\u30e5\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002XCode\u4e0a\u304b\u3089 \u30d5\u30a1\u30a4\u30eb &gt; \u65b0\u898f\u30d5\u30a1\u30a4\u30eb \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u5de6\u30da\u30a4\u30f3\u306eiOS &gt; Cocoa Touch Classes \u304b\u3089 <strong>UIViewController subclass <\/strong>\u3092\u9078\u629e\u3057\u3001\u300c\u6b21\u3078\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\"><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-637\" title=\"5-2\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-2-300x245.jpg\" alt=\"5-2\" width=\"300\" height=\"245\" \/><\/a><\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\"><strong>View2ViewController<\/strong> \u3068\u3044\u3046\u540d\u524d\u306b\u3057\u3066\u3001\u300c\u540c\u6642\u306bView2ViewController.h \u3082\u4f5c\u6210\u300d\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u300c\u5b8c\u4e86\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;\">\u51fa\u6765\u4e0a\u304c\u3063\u305fView2ViewController.h \u3068 View2ViewController.m \u306e\u4e8c\u3064\u3092XCode\u4e0a\u306eClasses\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<h4><span style=\"color: #008000;\">\u30d3\u30e5\u30fc\u3092\u79fb\u52d5\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a<\/span><\/h4>\n<p><strong>RootViewController.h <\/strong>\u3092\u958b\u304d\u3001\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p><span style=\"font-family: Menlo; line-height: normal; font-size: 11px; color: #d12e1b; \"><span style=\"color: #78492a;\">#import <\/span>&lt;UIKit\/UIKit.h&gt;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #78492a;\">#import <\/span>&#8220;View2ViewController.h&#8221;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@interface<\/span> RootViewController : UITableViewController {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">View2ViewController<\/span> *view2ViewController;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@property<\/span>(<span style=\"color: #bb2da2;\">nonatomic<\/span>,<span style=\"color: #bb2da2;\">retain<\/span>) View2ViewController *view2ViewController;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@end<\/p>\n<\/blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">\n<p>#import &#8220;View2ViewController.h&#8221; \u306b\u3088\u3063\u3066\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fViewController\u306e\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u3001\u3053\u308c\u306b\u3088\u308a\u3001View2ViewController\u578b\u306e\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001view2ViewController \u3068\u3044\u3046<strong>View2ViewController <\/strong>\u578b\u306e\u5909\u6570\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002\u982d\u6587\u5b57\u306e\u5927\u6587\u5b57(V)\u3068\u5c0f\u6587\u5b57(v)\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>view2ViewController\u306f\u3001<strong>View2ViewController <\/strong>\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3059\u308b\u969b\u306b\u4f7f\u3046\u5909\u6570\u540d\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001<strong>RootViewController.m <\/strong>\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n<span style=\"color: #bb2da2;\">@implementation<\/span> RootViewController \u3068\u3044\u3046\u4e00\u884c\u306e\u4e0b\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@synthesize<\/span> view2ViewController;<\/p>\n<\/blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">\n<p>\u6b21\u306b\u3001<strong>didSelectRowAtIndexPath <\/strong>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u63a2\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u8868\u306e\u30bb\u30eb\u304c\u30bf\u30c3\u30d7\u3055\u308c\u308b\u305f\u3073\u306b\uff08\u81ea\u52d5\u7684\u306b\uff09\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306f\u3001<strong>indexPath <\/strong>\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001\u5f8c\u3067\u3001<strong>NSArray<\/strong>\u3092\u4f7f\u3063\u3066<strong><strong>UITableView<\/strong><\/strong>\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3059\u6642\u306b\u5f79\u306b\u7acb\u3061\u307e\u3059\u304c\u3001\u4eca\u306f\u7121\u8996\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">void<\/span>)tableView:(<span style=\"color: #703daa;\">UITableView<\/span> *)<span style=\"color: #703daa;\">tableView<\/span> didSelectRowAtIndexPath:(<span style=\"color: #703daa;\">NSIndexPath<\/span> *)indexPath {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">if<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>view2ViewController<span style=\"color: #000000;\"> == <\/span><span style=\"color: #bb2da2;\">nil<\/span><span style=\"color: #000000;\">){<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>View2ViewController<span style=\"color: #000000;\"> *view2 = [[<\/span>View2ViewController<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">alloc<\/span><span style=\"color: #000000;\">] <\/span><span style=\"color: #3d1e81;\">initWithNibName<\/span><span style=\"color: #000000;\">:<\/span><span style=\"color: #d12e1b;\">@&#8221;View2&#8243;<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">bundle<\/span><span style=\"color: #000000;\">:[<\/span><span style=\"color: #703daa;\">NSBundle<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">mainBundle<\/span><span style=\"color: #000000;\">]];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>view2ViewController<span style=\"color: #000000;\"> = view2;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>[view2 <span style=\"color: #3d1e81;\">release<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ &#8230;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ Pass the selected object to the new view controller.<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">navigationController<\/span><span style=\"color: #000000;\"> <\/span>pushViewController<span style=\"color: #000000;\">:<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">view2ViewController<\/span><span style=\"color: #000000;\"> <\/span>animated<span style=\"color: #000000;\">:<\/span><span style=\"color: #bb2da2;\">YES<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">\n<p>\u4ee5\u4e0b\u3001\u30b3\u30fc\u30c9\u306e\u8aac\u660e\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001self.view2ViewController \u304cnull \u304b\u3069\u3046\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30bb\u30eb\u304c\u6700\u521d\u306b\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u6642\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5f8c\u3001ViewController\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3059\u308b\u305f\u3081\u306b\u3001\u30e1\u30e2\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001View2ViewController\u306e\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u3001view2ViewController\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002(\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306e\u9055\u3044\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002)<\/p>\n<p>viewController\u3092\u8a2d\u5b9a\u3057\u305f\u3042\u3068\u3001\u30e1\u30e2\u30ea\u89e3\u653e(\u30ea\u30ea\u30fc\u30b9)\u3057\u307e\u3059\u3002<\/p>\n<p>Objective-C\u306f\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u5099\u3048\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4f7f\u308f\u308c\u306a\u304f\u306a\u3063\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u660e\u793a\u7684\u306b\u81ea\u5206\u3067\u30e1\u30e2\u30ea\u3092\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306e\u4e00\u884c\u306f\u3001\u5b9f\u969b\u306b\u3001\u65b0\u3057\u304f\u4f5c\u3063\u305fview\u3078\u9077\u79fb\u3055\u305b\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p><strong>navigationController <\/strong>\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001<strong><strong>viewControllers <\/strong><\/strong>\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306e<strong>animated:YES <\/strong>\u306f\u3001\u30b3\u30f3\u30d1\u30a4\u30e9\u306b\u9077\u79fb\u306e\u969b\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u3068\u3044\u3046\u3053\u3068\u3092\u4f1d\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4><span style=\"color: #008000;\">\u30d3\u30e5\u30fc\u3068\u30b3\u30fc\u30c9\u3092\u63a5\u7d9a<\/span><\/h4>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u30b3\u30fc\u30c9\u3068\u5148\u307b\u3069\u4f5c\u3063\u305fview\u3092\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>View2.xib <\/strong>\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001Interface Builder\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p><strong>View2ViewController<\/strong>\u30af\u30e9\u30b9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068view\u3092\u95a2\u9023\u3065\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001<strong>File\u2019s Owner <\/strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u9078\u629e\u3057\u3001Attributes\u30a4\u30f3\u30b9\u30da\u30af\u30bf\u30d1\u30cd\u30eb\u306e\u4e00\u756a\u53f3\u306e\u300cidentity\u300d\u30bf\u30d6\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002Class Identity &gt; Class \u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u304b\u3089<strong>View2ViewController<\/strong> \u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-640\" title=\"5-4\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-4-244x300.jpg\" alt=\"5-4\" width=\"244\" height=\"300\" \/><\/a><\/p>\n<p>\u305d\u3057\u3066\u3001view\u30a6\u30a4\u30f3\u30c9\u30a6\u5185\u306e\u4efb\u610f\u306e\u5834\u6240\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001Attributes\u30a4\u30f3\u30b9\u30da\u30af\u30bf\u5185\u306eConnections(\u5de6\u304b\u3089\uff12\u756a\u76ee\u306e\u30bf\u30d6)\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002New Referencing Outlet \u306e\u53f3\u5074\u306e\u25cb\u3092File&#8217;s Owner \u307e\u3067\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u307e\u3059\u3002\u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3068view\u3068\u3044\u3046\u9078\u629e\u80a2\u304c\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-641\" title=\"5-5\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-5-300x236.jpg\" alt=\"5-5\" width=\"300\" height=\"236\" \/><\/a><\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u4e00\u5ea6\u3001\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u300cNext View\u300d\u3068\u3044\u3046\u30bb\u30eb\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u753b\u9762\u304c\u9077\u79fb\u3057\u3066\u3001view2\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u72b6\u614b\u3067\u306f\u3001<strong>NavigationController<\/strong>\u306e\u4e0a\u90e8\u306b\u623b\u308b\u30dc\u30bf\u30f3\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u5b9f\u969b\u306b\u306f\u623b\u308b\u30dc\u30bf\u30f3\u306f\u30a2\u30c3\u30d7\u30eb\u304b\u3089\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001\u30e1\u30a4\u30f3\u30d3\u30e5\u30fc\u306b\u30bf\u30a4\u30c8\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4>\u623b\u308b\u30dc\u30bf\u30f3\u3092\u8a2d\u7f6e<\/h4>\n<p>iPhone\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u3092\u9589\u3058\u3066\u3001<strong>RootViewController.m <\/strong>\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30d3\u30e5\u30fc\u304c\u521d\u3081\u3066\u30ed\u30fc\u30c9\u3055\u308c\u305f\u6642\u306b\u547c\u3070\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b<strong>viewDidLoad<\/strong>\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">void<\/span>)viewDidLoad {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"> [<\/span><span style=\"color: #bb2da2;\">super<\/span><span style=\"color: #000000;\"> <\/span>viewDidLoad<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">title<\/span><span style=\"color: #000000;\"> = <\/span>@&#8221;<span style=\"font: 11.0px 'Hiragino Kaku Gothic ProN';\">\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3<\/span>&#8220;<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p>RootViewController \u306f\u3001<strong>UITableViewController<\/strong>\u306e\u30b5\u30d6\u30af\u30e9\u30b9\u306a\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u7528\u3057\u3066\u30bf\u30a4\u30c8\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u304a\u597d\u304d\u306a\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u300c\u30e1\u30a4\u30f3\u30d3\u30e5\u30fc\u300d\u3068\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a6\u30a4\u30f3\u30c9\u30a6\u4e0a\u90e8\u306b\u30bf\u30a4\u30c8\u30eb\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-643\" title=\"5-6\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-6-158x300.jpg\" alt=\"5-6\" width=\"158\" height=\"300\" \/><\/a><\/p>\n<p>\u300cNextView\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u623b\u308b\u30dc\u30bf\u30f3\u304c\u8a2d\u7f6e\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-644\" title=\"5-7\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/11\/5-7-158x300.jpg\" alt=\"5-7\" width=\"158\" height=\"300\" \/><\/a>\u4e0a\u90e8\u306b\u8868\u793a\u3055\u308c\u305f\u300c\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u524d\u306e\u30da\u30fc\u30b8\u3078\u9077\u79fb\u3059\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u3042\u308bview\u304b\u3089\u4ed6\u306eview\u3078\u79fb\u52d5\u3055\u305b\u308b\u65b9\u6cd5\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002UINavig&#8230;<\/p>\n","protected":false},"author":1,"featured_media":635,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-old-blog"],"_links":{"self":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=631"}],"version-history":[{"count":0,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/631\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}