After tap some row in UITableView apps goes to new screen. I can replace e.g. the image in UIImageView in this screen, while opening, but I defined there also NSString which cannot be replaced. Don’t know why. This NSString is just defined in file .h of screenView class as NSString with @property(nonatomic,retain).
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.navigationController pushViewController:self.screenView animated:YES];
self.screenView.title = @"Screen Name";
self.screenView.imageView.image = MyImage; // this work
self.screenView.MyString = @"Work?"; // but this not
}
Why it doesn’t want to attribute a new value for NSString, while the image can be replaced this way?
In which method do you log MyString?
I assume you are doing this when the view is being shown or loaded, which means that the it will not contain a value since you are setting it after the push.
I would suggest to try: