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

  • SEARCH
  • Home
  • 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 8086409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:26:11+00:00 2026-06-05T18:26:11+00:00

(I am developing an app that presents chat messages in a table. But, this

  • 0

(I am developing an app that presents chat messages in a table. But, this chat can’t be started by the user, when the user receives a message the chat view opens. So, I made this code:

- (void) newMessageReceived:(NSMutableDictionary *)message
{
   General *general = [General sharedManager];
   NSString *firstmessage=[message objectForKey:@"msg"];
   NSString *from=[message objectForKey:@"sender"];    
   NSArray *listItems = [from componentsSeparatedByString:@"@"];
   NSString *fromsplit=[listItems objectAtIndex:0];
   general.firstmess=firstmessage;
   general.firstfrom=fromsplit;
   NSLog(@"Mensaje recibido: %@ de %@", [message objectForKey:@"msg"], fromsplit);

   ChatViewController *cvc=[[ChatViewController alloc]initWithNibName:@"Chat" bundle:nil];

   [[self navigationController]pushViewController:cvc animated:YES];
}

Everything is ok, until here. The ChatViewController extends UITableViewController. But, when a message is received i get the following exception:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "Chat" nib but didn't get a UITableView.

Then, i try to change the class extended to UIViewController (did this to check that the program enters the numberOfRowsInSection method) and then i receive:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ChatViewController setTableViewStyle:]: unrecognized selector sent to instance 0x9863200'

I think that solving the first exception would fix my problem. Any help?

Thank you.

  • 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-05T18:26:12+00:00Added an answer on June 5, 2026 at 6:26 pm

    Solved it. i click the .xib file, under “objects”, clicked “View”. And then, in the Identity Inspector (the third one, starting from the left), in Custom Class, set it to UITableView. It was simply “View” before. And then, everything worked fine.

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

Sidebar

Related Questions

I'm developing web app that user can save his/her work to server. The data
I am developing an app that contains a view controller,where the user fills all
I am developing an app that needs the chat functionality, presenting messages sent and
This is the scenario i have: im developing a web app that will list
im developing an app that retrieves a rss feed from a website but i
I am developing an app that needs to send text messages, so I have
I'm developing an app that needs to download a script from the web but
I'm developing an app that essentially is Paint style. The user touchs the screen
I am developing an app that will use the profile picture of user. I
Developing an app that people pay a monthly subscription to use. They can pay

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.