Note that there are some explanatory texts on larger screens.

plurals
  1. POI'm getting EXC_BAD_ACCESS trying to use my subclass of UITableViewController
    text
    copied!<p>I'm trying to incorporate and modify the expanding section headers from WWDC 2010 vol128 Mastering Table Views. However, I must have missed a step or forgot something because I'm getting the EXC_BAD_ACCESS error when I try to access my view with the table view. </p> <p>I forget where you can find the source code, but it's on their developer website. It's a lot of code to post.</p> <p>The main difference I see is that their version adds the subclass of UITableViewController as a subview to their appdelegate ie. window. I want to add my controller to my scrollview which is in a viewcontroller. I'm sure there is an issue because of that?</p> <p>The original below makes no sense to me because it releases the aTableViewController before adding it as a subview, which in my version I cannot do. It also makes self.tableViewController = aTableViewController; the tableViewController is synthesized at the top like this: <code>@synthesize tableViewController=tableViewController_</code> I dont know where it comes from since it is not referenced anywhere else in the project. Again, the original had this code in the app delegate, so maybe there's something I dont know that is going on there.</p> <p>Apple's code (it works):</p> <pre><code> TableViewController* aTableViewController = [[TableViewController alloc] initWithStyle:UITableViewStylePlain]; aTableViewController.plays = self.plays; self.tableViewController = aTableViewController; [aTableViewController release]; // Stamdard window display. [self.window addSubview:aTableViewController.view]; [self.window makeKeyAndVisible]; </code></pre> <p>For testing purposes, I made an empty testTableViewController subclass which is virtually empty, and tried to add it as a subview with the same outcome. Perhaps, I'm creating a UITableViewController subclass incorrectly. Sorry, for being vague, but I think it has something to do with the snippet of information given above.</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload