Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableViewCell isn't accessible with standard method?
    primarykey
    data
    text
    <p>I'm working on a project which has a controller, <code>Controller</code>, which holds all the logic (i.e. is the <code>UITableViewDelegate</code>). I have a view, <code>View1</code> which is a subclasses <code>UIView</code> containing a <code>UITableView</code> as a property.</p> <p>My problem is that I want to update the first row (which is some sort of a header-row) when something happens. I thought I could do this call: </p> <pre><code>UITableViewCell* headCell = (UITableViewCell*) [view1.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; </code></pre> <p>but this doesn't seem to work. my <code>headCell</code> is <code>(null)</code> when I <code>NSLog(@"%@", [headCell description]);</code></p> <p>My controller calls <code>[view1.tableView setDelegate:self]</code>, so I was also trying to call <code>[self cellForRow..]</code> but I just got unrecognized selector. The <code>NSIndexPath</code> should be correct, right?</p> <p>I've tried to read up on this, but everyone seems to get cellForRowAtIndexPath to work, but I can't. Anyone got any ideas?</p> <p>edit: I did a workaround instead, so can't really accept any answers without having tested them. Thanks though. The workaround was to create a cell that is referenced in the <code>cellForRowAtIndexPath:</code>-method and tweak it manually somewhere else. I know it's not best practice, but I don't have time to do otherwise right now. Thanks for contributions though, I'll check in later to test them and accept as answers if I can get it to work :)</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