Note that there are some explanatory texts on larger screens.

plurals
  1. PO"property not found on object of type" error in prepareForSegue trying to send parameters to the next Table View Controller
    primarykey
    data
    text
    <p>Xcode doesn't seem to find the properties of a given UITableViewController even though I'm importing it and they seem correctly defined on the class.</p> <p>I've tried to clean, delete derived data, restart XCode and build again, none of this works. Also have tried to access the property through the setter.</p> <p>This is my code:</p> <p><strong>MasterViewController.m</strong></p> <pre><code>#import "DetailTableViewController.h" ... - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"nextScreen"]) { DetailTableViewController *detailTableViewController = [segue destinationViewController]; NSInteger tagIndex = [(UIButton *)sender tag]; detailTableViewController.productType = tagIndex; /*[detailTableViewController setProductType:tagIndex];*/ //This does not work either. } else if ([[segue identifier] isEqualToString:@"anotherSegue"]){ MyLoginViewController *loginViewController = [segue destinationViewController]; loginViewController.delegate = self; //Funnily enough, this one works } } </code></pre> <p><strong>DetailTableViewController.h</strong> #import </p> <pre><code>@interface DetailTableViewController : UITableViewController&lt;UITableViewDelegate, UITableViewDataSource&gt; { NSInteger *productType; } @property (nonatomic) NSInteger *productType; @end </code></pre> <p><strong>DetailTableViewController.m</strong></p> <pre><code>@implementation DetailTableViewController @synthesize productType = _productType; ... </code></pre> <p><strong>edit:</strong> The error comes into this line:</p> <pre><code>detailTableViewController.productType = tagIndex; </code></pre> <p>Does anyone have an idea about why could this happen? Thanks!</p> <p><strong>Updated:</strong></p> <p>Looks like it's something related to how XCode is referencing my files, it's really odd:</p> <ul> <li><p>When I cmd + click on detailTableViewController (the one where I create my instance) it takes me to my actual code:</p> <pre><code> detailTableViewController *detailTableViewController = [segue destinationViewController]; </code></pre></li> <li><p>But when I cmd + click on the import line, it takes me to some interface with the same name as mine, and same declaration except it does not have any of the properties my code has.</p> <pre><code>#import "DetailTableViewController.h" </code></pre></li> </ul> <p>Has anyone gone through the same issue?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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