Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:59:52+00:00 2026-06-15T07:59:52+00:00

I’m doing a SplitViewController with a TableViewController in the Detail and Master. I get

  • 0

I’m doing a SplitViewController with a TableViewController in the Detail and Master.

I get this message in the console when I try to run:

2012-10-06 16:42:05.304 BaylorNotes7[3040:c07] *** Assertion failure in -[UITableView       _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2372/UITableView.m:5471
2012-10-06 16:42:05.306 BaylorNotes7[3040:c07] *** Terminating app due to uncaught   exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a    cell from tableView:cellForRowAtIndexPath:'

The problem is in the DetailViewController.m:

#import "DetailViewController.h"
#import "NSString+HTML.h"

typedef enum { SectionHeader, SectionDetail } Sections;
typedef enum { SectionHeaderTitle, SectionHeaderDate, SectionHeaderURL } HeaderRows;
typedef enum { SectionDetailSummary } DetailRows;

@implementation DetailTableViewController

@synthesize item, dateString, summaryString;

#pragma mark -
#pragma mark Initialization

- (id)initWithStyle:(UITableViewStyle)style {
if ((self = [super initWithStyle:style])) {

}
return self;
}

#pragma mark -
#pragma mark View lifecycle

- (void)viewDidLoad {

// Super
[super viewDidLoad];



// Summary
if (item.summary) {
    self.summaryString = [item.summary stringByConvertingHTMLToPlainText];
} else {
    self.summaryString = @"[No Summary]";
}

}

#pragma mark -
#pragma mark Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView  {
// Return the number of sections.
return 2;
}


- (NSInteger)tableView:(UITableView *)tableView  numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
switch (section) {
    case 0: return 1;
    default: return 1;
}
}

// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewCell *cell = [tableView
                         dequeueReusableCellWithIdentifier:@"DetailCell"];

// Display
cell.textLabel.textColor = [UIColor blackColor];
cell.textLabel.font = [UIFont systemFontOfSize:15];
if (item) {

    // Item Info
    NSString *itemTitle = item.title ? [item.title stringByConvertingHTMLToPlainText] : @"[No Title]";

    // Display
    switch (indexPath.section) {
        case SectionHeader: {

            // Header
            switch (indexPath.row) {
                case SectionHeaderTitle:
                    cell.textLabel.font = [UIFont fontWithName:@"Times New Roman" size:20];
                    cell.textLabel.text = itemTitle;
                    break;
            }
            break;

        }
        case SectionDetail: {

            // Summary
            cell.textLabel.text = summaryString;
            cell.textLabel.numberOfLines = 100; // Multiline
            cell.textLabel.font = [UIFont fontWithName:@"Times New Roman" size:20];
            break;

        }
    }
}

return cell;

}

- (CGFloat)tableView:(UITableView *)tableView  heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == SectionHeader) {

    // Regular
    return 60;

} else {

    // Get height of summary
    NSString *summary = @"[No Summary]";
    if (summaryString) summary = summaryString;

    CGSize s = [summary sizeWithFont:[UIFont systemFontOfSize:20]
                   constrainedToSize:CGSizeMake(self.view.bounds.size.width - 40, MAXFLOAT)  // - 40 For cell padding

                       lineBreakMode:UILineBreakModeWordWrap];

    return s.height; // Add padding

}
}

#pragma mark -
#pragma mark Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

// Open URL
if (indexPath.section == SectionHeader && indexPath.row == SectionHeaderURL) {
    if (item.link) {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:item.link]];
    }
}

// Deselect
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];

}

@end

I’m pretty sure the problem is somewhere in the Table declaration. In case anyone is wondering, I followed the MWFeedParser tutorial to get this. Any help is appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:59:53+00:00Added an answer on June 15, 2026 at 7:59 am

    Select the prototype cell in the storyboard, go to the Attributes inspector, type it into the Identifier field.
    and set the proper identifier.

    Credit:
    http://www.raywenderlich.com/forums/viewtopic.php?f=13&t=4217

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code to decode numeric html entities to the UTF8 equivalent character.
I would like to run a str_replace or preg_replace which looks for certain words
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.