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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:34:02+00:00 2026-05-31T07:34:02+00:00

This code copied anywhere else seems to work. It’s just inside my app where

  • 0

This code copied anywhere else seems to work. It’s just inside my app where it crashes. Any ideas why?

another .m…

#import "JEntryTableViewController.h"
@interface JCreateViewController () {

    JEntryTableViewController *_tableView;

}

@property (nonatomic, strong) JEntryTableViewController *tableView;

@end

@implementation JCreateViewController

@synthesize tableView = _tableView;

- (id)init
{
    self = [super init];
    if (self) {

        self.tableView = [[JEntryTableViewController alloc] initWithStyle:UITableViewStylePlain];
        [self.view addSubview:self.tableView.view];

    }
    return self;
}

JEntryTableViewController.h:

#import <UIKit/UIKit.h>


@interface JEntryTableViewController : UITableViewController {

}

@end

JEntryTableViewController.m:

#import "JEntryTableViewController.h"

@interface JEntryTableViewController ()

@end

@implementation JEntryTableViewController

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

- (void)viewDidLoad
{
    [super viewDidLoad];
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 5;
}

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

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

    return cell;
}

#pragma mark - Table view delegate

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

}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 60;
}

@end

I ran this as a quick test to make sure it was set up right, and to my surprise, when i scroll back to a cell I’ve already seen, it crashes and gives me a EXC_BAD_ACCESS error. Unfortunately the debugging area isn’t giving me anything back that I can work with, and i really don’t know what the problem is – it’s such a basic, simple bunch of code. I don’t know what to fix. It should work.

  • 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-05-31T07:34:03+00:00Added an answer on May 31, 2026 at 7:34 am

    You way to implement the tableView may not the usual way we often do.

    You can add the tableView directly into a ViewController without using another viewController inherit from UITableViewController.

    What you should do is identically as what you did in JEntryTableViewController.

    When come to the EXC_BAD_ACCESS problem, there are several solutions to find the exact problem.
    1. EXC_BAD_ACCESS signal received
    http://www.touch-code-magazine.com/how-to-debug-exc_bad_access/

    1. at the right section of Xcode break points you can add these kind of break points, it may help you find the exception quickly in your case.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

//just copied this code from w3schools var person={fname:John,lname:Doe,age:25}; for (x in person) { document.write(person[x]
This code is copied from another file and it works in that file, I
I copied this code from an example . I've read it 100 times. Array.prototype.map
I have this sample code for async operations (copied from the interwebs) public class
This code does not seem to compile, I just need to write something to
This code is copied directly from http://java.sun.com/docs/books/jni/html/objtypes.html#4013 JNIEXPORT jstring JNICALL Java_Prompt_getLine(JNIEnv *env, jobject obj,
when i copied this code from page error found that there is syntax error
I'm passing this inside an each loop (DOM object) to another function but in
I have this code copied from C# 4.0 in a nutshell that uses Attribute/Reflection
I have this code copied from Android developers website: public class ExampleActivity extends Activity

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.