I have a UITableView, and when I push the view using this code (simplified ‘dic’ exists). The first time it it will load the markup object. But then when I go back and open a different cell, it uses the same markup object. Should I use a selector on the back button to nullify the self.ViewController.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (!self.ViewController) {
self.ViewController = [[TextViewController alloc] initWithNibName:@"ViewController" bundle:nil markup:[dic objectForKey:@"text"]];
}
[self.navigationController pushViewController:self.ViewController animated:YES];
}
The property won’t update. I tried different setting methods just to be sure.
Is there an ultra-weak setting I can put the markup Property on?
Solved. I simply nullified the self.ViewController if it already existed. I used this at the beginning of the code.