I have an NSInteger in my app delegate called healthInt. In the app delegate i have healthInt set to 100. And when the application loads the first view healthInt is still equal to 100. But when it loads the next view, healthInt is set to 0. Even though a label in that view controller (titled healthLabel) displays 100. The reason this is a problem is because what i wanna do is
-(void)viewDidLoad{
if(appDelegate.healthInt <= 0){
healthLabel.text = @"Dead";
}
}
But this doesn't seem to work. And i know this is bad architecture but it's a bit too late for me to redo the entire project. If you need to see other code i'll be happy to show it to you :)