{"id":1343,"date":"2012-08-11T08:35:31","date_gmt":"2012-08-10T23:35:31","guid":{"rendered":"http:\/\/www.hawk-a.com\/exception_code\/?p=1343"},"modified":"2013-09-06T15:16:02","modified_gmt":"2013-09-06T06:16:02","slug":"xcodestoryboard%e3%81%a7%e4%bd%9c%e3%81%a3%e3%81%9ftableviewcell%e3%81%a7%e3%82%aa%e3%83%aa%e3%82%b8%e3%83%8a%e3%83%ab%e3%81%ae%e3%82%bb%e3%83%ab%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"http:\/\/www.hawk-a.com\/exception_code\/archives\/1343","title":{"rendered":"[XCode]StoryBoard\u3067\u4f5c\u3063\u305fTableViewCell\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30bb\u30eb\u3092\u8868\u793a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2013\/09\/bloggerXcode-icon-375x375-75.png\" alt=\"Xcode icon 375x375 75\" title=\"Xcode-icon-375x375-75.png\" border=\"0\" width=\"375\" height=\"375\" \/><\/p>\n<p>TableView\u6a19\u6e96\u306e\u30bb\u30eb\u3067\u306f\u3084\u308a\u305f\u3044\u3053\u3068\u304c\u8868\u73fe\u3067\u304d\u306a\u3055\u305d\u3046\u306a\u6642\u306b\u306f\u3001TableViewCell\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001StoryBoard\u3067\u4f5c\u3063\u305fTableViewCell\u3092\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u304c\u7d50\u69cb\u308f\u304b\u3089\u306a\u304f\u3066\u982d\u3092\u62b1\u3048\u305f\u306e\u3067\u30b7\u30a7\u30a2\u3057\u307e\u3059\u3002<!--more--><\/p>\n<h2>StoryBoard\u3067UI\u3092\u4f5c\u6210<\/h2>\n<p>\u307e\u305a\u306fStoryBoard\u3092\u4f7f\u3063\u3066UI\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u50d5\u306f\u307e\u3063\u3055\u3089\u306aUIViewController\u304b\u3089View\u3092\u4f5c\u308a\u3053\u3093\u3067\u3044\u304f\u306e\u304c\u597d\u304d\u306a\u306e\u3067\u3001UIViewController\u306bTableView\u3068TableViewCell\u3092\u8a2d\u7f6e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3081\u3093\u3069\u304f\u3055\u3044\u4eba\u306fTableViewController\u304b\u3089\u4f5c\u3063\u3066\u3082OK\u3067\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f3\u3064\u306eUILabel\u306b\u6587\u5b57\u3092\u8868\u793a\u3055\u305b\u305f\u3044\u306e\u3067\u3001\u3053\u3093\u306a\u611f\u3058\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"TableCustomCellTest.xcodeproj \u2014 ViewController.h-1.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/08\/768459f27eb46e2569f07b6f6d74709e.png\" alt=\"TableCustomCellTest xcodeproj  ViewController h 1\" width=\"324\" height=\"480\" border=\"0\" \/><\/p>\n<p><strong>\u3053\u306e\u6642\u3001\u30e9\u30d9\u30eb\u306fOutlet\u306b\u7e4b\u304c\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/p>\n<p>Outlet\u306b\u7e4b\u3044\u3067\u3057\u307e\u3046\u3068\u3001Uncategorized Compilation failed.\u306a\u308b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30b9\u30bf\u30e0\u30bb\u30eb\u306e\u5b9f\u88c5\u65b9\u6cd5<\/h2>\n<p>.h\u30d5\u30a1\u30a4\u30eb\u306e\u30bd\u30fc\u30b9\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"TableCustomCellTest.xcodeproj \u2014 ViewController.h.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/08\/283bf9087fba0a70762666063f63a5a4.png\" alt=\"TableCustomCellTest xcodeproj  ViewController h\" width=\"500\" height=\"85\" border=\"0\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u3053\u3053\u307e\u3067\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u3001\u6b21\u306f\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u30a4\u30f3\u30b9\u30da\u30af\u30bf\u30fc\u304b\u3089\u5404Label\u306eTag\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u9055\u3046\u30bf\u30b0\u756a\u53f7\u3067\u30010\u4ee5\u5916\u306e\u3082\u306e\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u308c\u304c\u4eca\u56de\u306e\u30df\u30bd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"TableCustomCellTest.xcodeproj \u2014 MainStoryboard.storyboard-3-1.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/08\/df17378c26f9241953ed7f37e373981e.png\" alt=\"TableCustomCellTest xcodeproj  MainStoryboard storyboard 3 1\" width=\"255\" height=\"253\" border=\"0\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u6b21\u306b\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002.m\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u6307\u5b9a\u3057\u305f\u30e9\u30d9\u30eb\u306e\u30bf\u30b0\u3092\u8aad\u307f\u8fbc\u3080\u2192\u30e9\u30d9\u30eb\u306b\u6587\u5b57\u3092\u4ee3\u5165\u3068\u3044\u3046\u6d41\u308c\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"TableCustomCellTest.xcodeproj \u2014 ViewController.m.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/08\/cf6c24f9515ec0d3a8eee75067153316.png\" alt=\"TableCustomCellTest xcodeproj  ViewController m\" width=\"500\" height=\"214\" border=\"0\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u3053\u308c\u3092\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c\u3059\u308c\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"iOS\u30b7\u30df\u30e5\u30ec\u30fc\u30bf.png\" src=\"http:\/\/www.hawk-a.com\/exception_code\/wp-content\/uploads\/2012\/08\/49b20a5beb763d2ad0463141b14500fc1.png\" alt=\"IOS\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\" width=\"323\" height=\"480\" border=\"0\" \/><\/p>\n<p>\u3053\u308c\u3067\u30bb\u30eb\u3092\u30ab\u30b9\u30bf\u30e0\u3057\u653e\u984c\u3067\u3059\u306d\uff01<\/p>\n<h2>\u30ab\u30b9\u30bf\u30e0\u30bb\u30eb\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h2>\n<p>.h\u30d5\u30a1\u30a4\u30eb<\/p>\n<pre class=\"prettyprint\">\r\n#import &lt;UIKit\/UIKit.h&gt;\r\n\r\n@interface ViewController : UIViewController &lt;UITableViewDelegate,UITableViewDataSource&gt; {\r\n    IBOutlet UITableView *tblTest;\r\n    IBOutlet UILabel *lbl1;\r\n    IBOutlet UILabel *lbl2;\r\n    IBOutlet UILabel *lbl3;\r\n}\r\n\r\n@end\r\n<\/pre>\n<p>.m\u30d5\u30a1\u30a4\u30eb<\/p>\n<pre class=\"prettyprint\">\r\n#import &quot;ViewController.h&quot;\r\n\r\n@interface ViewController ()\r\n\r\n@end\r\n\r\n@implementation ViewController\r\n\r\n- (void)viewDidLoad\r\n{\r\n    [super viewDidLoad];\r\n    tblTest.delegate = self;\r\n    tblTest.dataSource = self;\r\n    \r\n}\r\n\r\n-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {\r\n    return 3;\r\n}\r\n\r\n-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {\r\n    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@&quot;CustomCell&quot;];\r\n    \r\n    \/\/ \u8868\u793a\u30bf\u30b0\r\n    lbl1 = (UILabel *)[cell viewWithTag:1];\r\n    lbl2 = (UILabel *)[cell viewWithTag:2];\r\n    lbl3 = (UILabel *)[cell viewWithTag:3];\r\n    \r\n    \/\/ \u30e9\u30d9\u30eb\u306b\u6587\u5b57\u3092\u6307\u5b9a\r\n    lbl1.text = @&quot;\u30bb\u30eb\u306e&quot;;\r\n    lbl2.text = @&quot;\u30ab\u30b9\u30bf\u30e0\u306b&quot;;\r\n    lbl3.text = @&quot;\u6210\u529f\uff01&quot;;\r\n\r\n    \/\/ \u8a2d\u5b9a\u3057\u305f\u30bb\u30eb\u3092\u8fd4\u3059\r\n    return cell;\r\n}\r\n\r\n- (void)viewDidUnload\r\n{\r\n    [super viewDidUnload];\r\n    \/\/ Release any retained subviews of the main view.\r\n}\r\n\r\n- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation\r\n{\r\n    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);\r\n}\r\n\r\n@end\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>TableView\u6a19\u6e96\u306e\u30bb\u30eb\u3067\u306f\u3084\u308a\u305f\u3044\u3053\u3068\u304c\u8868\u73fe\u3067\u304d\u306a\u3055\u305d\u3046\u306a\u6642\u306b\u306f\u3001Tabl &#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\/1343"}],"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=1343"}],"version-history":[{"count":1,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts\/1343\/revisions"}],"predecessor-version":[{"id":2120,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/posts\/1343\/revisions\/2120"}],"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=1343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/categories?post=1343"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hawk-a.com\/exception_code\/wp-json\/wp\/v2\/tags?post=1343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}