I found my error and it seems I left out a crucial piece of code from my question, or you had probably immediately recognized it. Sorry about that. I'll post what I've learned.
Earlier in "ChargeVC.m" I had set
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.view.backgroundColor = [UIColor blackColor];
}
return self;
}
For reasons I don't fully understand, me setting a value for self.view.backgroundColor
there triggered something and the personIndex
variable always got lost and/or wasn't accessible during viewDidLoad
. As soon as I removed the function, personIndex
showed up.
Thanks to rdelmar, who got me on the right track to figuring this out and to all others who helped.