{"id":2075,"date":"2014-02-15T12:00:58","date_gmt":"2014-02-15T03:00:58","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2075"},"modified":"2014-02-15T12:11:10","modified_gmt":"2014-02-15T03:11:10","slug":"nsinternalinconsistencyexception","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2075","title":{"rendered":"NSInternalInconsistencyException"},"content":{"rendered":"<p>\u6700\u8fd1\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3067\u5168\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u3084\u308b\u6c17\u3082\u7121\u304f\u306a\u3063\u3066\u3044\u3066\u4e45\u3057\u3076\u308a\u306b iOS\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3002<br \/>\n\u305d\u3053\u3067\u65e9\u901f\u30cf\u30de\u3063\u305f\u30a8\u30e9\u30fc\u3002<\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u306e\u3067\u3001\u4e0b\u8a18\u306e\u623b\u308a\u5024\u30921\u306b\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>[c]<br \/>\n&#8211; (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView<br \/>\n{<br \/>\n    \/\/ Return the number of sections.<br \/>\n    return 1;<br \/>\n}<br \/>\n[\/c]<\/p>\n<p>\u3057\u304b\u3057\u3001NSInternalInconsistencyException\u30a8\u30e9\u30fc\u3068\u306a\u308b\u3002<br \/>\n\u3069\u3046\u3084\u3089\u3001storyboard\u3067\u753b\u9762\u9077\u79fb\u3092\u3057\u306a\u3044\u306e\u3067\u3001\u4f55\u304b\u77db\u76fe\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3046\u3060\u3002<br \/>\n[bash]<br \/>\nTerminating app due to uncaught exception &#8216;NSInternalInconsistencyException&#8217;,<br \/>\nreason: &#8216;unable to dequeue a cell with identifier Cell &#8211;<br \/>\nmust register a nib or a class for the identifier or connect a prototype cell in a storyboard&#8217;<br \/>\n[\/bash]<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u90e8\u5206\u3067\u30a8\u30e9\u30fc\u3068\u306a\u3063\u3066\u3044\u305f\u3002<br \/>\nindexPath\u306b\u898b\u5408\u3046identifier\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3088\u3046\u3060\u3002<br \/>\n[c]<br \/>\n&#8211; (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath<br \/>\n{<br \/>\n    static NSString *CellIdentifier = @&quot;Cell&quot;;<br \/>\n    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];<br \/>\n\/\/    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];<\/p>\n<p>    \/\/ Configure the cell&#8230;<br \/>\n    if (cell == nil) {<br \/>\n        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];<br \/>\n    }<br \/>\n    cell.textLabel.text = @&quot;\u30bb\u30eb&quot;;<br \/>\n    return cell;<br \/>\n}<br \/>\n[\/c]<\/p>\n<p>\u7d50\u5c40\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u90e8\u5206\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3001cell\u306enil\u5224\u5b9a\u3067\u521d\u671f\u5316\u3059\u308b\u51e6\u7406\u3092\u8a18\u8ff0\u3002<br \/>\n\u3046\u307e\u304f\u884c\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3084\u3063\u3071\u308a\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u4f5c\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u826f\u304f\u307f\u306a\u3044\u3068\u3001\u81ea\u5206\u3067\u8a18\u8ff0\u3059\u308b\u5834\u5408\u3068\u3001storyboard\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306e\u8a18\u8ff0\u65b9\u6cd5\u306b\u306f\u3001\u4eca\u5f8c\u3082\u6c17\u3092\u3064\u3051\u306a\u3044\u3068\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3067\u5168\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u3084\u308b\u6c17\u3082\u7121\u304f\u306a\u3063\u3066\u3044\u3066\u4e45\u3057\u3076\u308a\u306b iOS\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3002 \u305d\u3053\u3067\u65e9\u901f\u30cf\u30de\u3063\u305f\u30a8\u30e9\u30fc\u3002 \u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u306e\u3067\u3001\u4e0b\u8a18\u306e\u623b\u308a\u5024\u30921\u306b\u8a2d\u5b9a\u3059\u308b\u3002 [c] &#8211; (NSIn [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[38,4],"tags":[],"class_list":["post-2075","post","type-post","status-publish","format-standard","hentry","category-objective-c","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2075"}],"version-history":[{"count":5,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2075\/revisions"}],"predecessor-version":[{"id":2080,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2075\/revisions\/2080"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}