{"id":344,"date":"2016-10-09T07:24:44","date_gmt":"2016-10-08T22:24:44","guid":{"rendered":"http:\/\/blue-bear.jp\/kb\/?p=344"},"modified":"2016-10-09T07:24:44","modified_gmt":"2016-10-08T22:24:44","slug":"swift-tableview%e8%a4%87%e6%95%b0%e3%82%bb%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a7%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%bb%e3%83%ab%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blue-bear.jp\/kb\/swift-tableview%e8%a4%87%e6%95%b0%e3%82%bb%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a7%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%bb%e3%83%ab%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b\/","title":{"rendered":"[swift] tableview\u8907\u6570\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u30ab\u30b9\u30bf\u30e0\u30bb\u30eb\u3092\u5b9f\u88c5\u3059\u308b"},"content":{"rendered":"<h2>tableview\u8907\u6570\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u30ab\u30b9\u30bf\u30e0\u30bb\u30eb\u3092\u5b9f\u88c5\u3059\u308b<\/h2>\n<p>\u8907\u6570\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u6301\u3064tableiView\u3067\u30bb\u30af\u30b7\u30e7\u30f3\u3054\u3068\u306b\u30ab\u30b9\u30bf\u30e0cell\u3092\u5b9f\u88c5\u3057\u305f\u304f\u3001tableView\u30b3\u30fc\u30c9\u5185\u3067\u6700\u521d\u306fif section\u301c\u3067\u5206\u5c90\u3055\u305b\u3088\u3046\u3068\u3057\u305f\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u306b\u5909\u66f4<\/p>\n<h3>cell\u3092\u5b9a\u7fa9<\/h3>\n<pre>\r\nvar customCell1 : CustomCell1!\r\nvar customCell2 : CustomCell2!\r\n<\/pre>\n<h3>viewDidLoad<\/h3>\n<pre>\r\noverride func viewDidLoad() {\r\n        super.viewDidLoad()\r\n        \r\n        tableView.dataSource = self\r\n        tableView.delegate = self\r\n        customCell1 = tableView.dequeueReusableCellWithIdentifier(\"customCell1\", forIndexPath: NSIndexPath(forRow: 0, inSection: 0)) as! CustomCell1\r\n        customCell2 = tableView.dequeueReusableCellWithIdentifier(\"customCell2\", forIndexPath: NSIndexPath(forRow: 0, inSection: 1)) as! CustomCell2\r\n}\r\n<\/pre>\n<h3>tableView\u30b3\u30fc\u30c9\u5185<\/h3>\n<pre>\r\nfunc tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {\r\n        switch indexPath.section {\r\n        case 0:\r\n            return customCell1\r\n        case 1:\r\n            return customCell2\r\n        default:\r\n            return customCell1\r\n        }\r\n    }\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>tableview\u8907\u6570\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u30ab\u30b9\u30bf<\/p>\n","protected":false},"author":1,"featured_media":88,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/344"}],"collection":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":1,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":345,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/344\/revisions\/345"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media\/88"}],"wp:attachment":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}