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 7777527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:09:54+00:00 2026-06-01T18:09:54+00:00

I made a demo empty app and add a navigation controller with the view

  • 0

I made a demo empty app and add a navigation controller with the view

UINavigationController *navBar = [[UINavigationController alloc]initWithRootViewController:objFirstViewControllerViewController];
[self.window addSubview:navBar.view];

After it i add a table view on the first view controller like this .

UITableView* demotableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, 320, 400) style:UITableViewStylePlain];
demotableView.delegate = self;
demotableView.dataSource = self;
[self.view addSubview:demotableView];

and the delegate function of the table view and main cell for row function like this way

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
 NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  cell.textLabel.text = @"Hello this is sample text";
cell.textLabel.minimumFontSize = 12;
cell.textLabel.adjustsFontSizeToFitWidth = TRUE;
cell.textLabel.font = [UIFont fontWithName:@"Copperplate" size:18];
return cell;
}

But when i scroll on my table or click any cell to go on the next view it just crash and give these two error on clicking and scrolling respectively.

[__NSCFArray tableView:didSelectRowAtIndexPath:]
[__NSCFDictionary tableView:cellForRowAtIndexPath:]

I don’t understand what is getting wrong this code it have been working with the prior os properly

Any body can help please ?

Here is the code for did select row

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Second *anotherViewController = [[Second alloc] initWithNibName:nil bundle:nil];
[self.navigationController pushViewController:anotherViewController animated:YES];

}

and no of row is this one

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

return 15;
}
  • 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-01T18:09:57+00:00Added an answer on June 1, 2026 at 6:09 pm

    Actually I misused the ARC what are the changes I made to make the app run successfully actually it was crashing due to memory leak I reference the class in delegate with local object but the it got released when it tried to add the data on it and when table’s delegate and datasource try to add the things in the current class it was released and it throw message from those message instances, I was stuck because I was thinking it is happening due to me having taken an empty kind of application but after adding the lines below in the delegate class I got the problem solved.

    What I did in the delegate class in the .h file:

     FirstViewControllerViewController *objFirstViewControllerViewController;
    
    @property (strong, nonatomic)  FirstViewControllerViewController *objFirstViewControllerViewController;
    

    Then my table started behaving properly and all things that I was having problem in.

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

Sidebar

Related Questions

I've made up a small test app to demo the issue I'm trying to
I made 2 different horizontal sliding, navigation methods ( demo ). The first is
I made a basic rails app with a simple pages controller with an index
I made a demo using v2, and now I want to use v3. But
I have been using a demo site since yesterday and made a version on
I made a view to abstract columns of different tables and pre-filter and pre-sort
I have made the smallest demo project to illustrate my problem. You can download
So, I made a cool demo which I want to show to my friends.
I made simple procedure just to demonstrate CREATE PROCEDURE `demo`(demo_int int) BEGIN DECLARE minid
I made a web page that uses jQuery: http://benmccormack.com/demo/MichaelMassPsalm/Psalm16Mode5.html When you change the selection

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.