I am new to Objective-c and Xcode, yet I believe I know enough about it to realize that something is going wrong here. I have an application using a storyboard, and one of the views in the application is not running its viewDidLoad method. I am not sure if this is relevant, but I had recently accidentally deleted my original storyboard, and had to make another one. The original had worked great with no problems, yet when I use the new one, it does not work. The view in question is also the first view of a Tab Bar Controller, which might be part of the problem.
Here is the code from the class responsible for the view (.h):
#import <UIKit/UIKit.h>
@interface TabSynth : UIViewController
@property (nonatomic, retain) IBOutlet UIImageView *tomeWater;
@property (nonatomic, retain) IBOutlet UIImageView *tomeFire;
@property (nonatomic, retain) IBOutlet UIImageView *tomeAir;
@property (nonatomic, retain) IBOutlet UIImageView *tomeEarth;
@property (nonatomic, retain) IBOutlet UIImageView *tomeDark;
@property (nonatomic, retain) IBOutlet UIImageView *tomeLight;
@property (nonatomic, retain) IBOutlet UIButton *airSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *darkSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *earthSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *fireSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *lightSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *waterSynthButton;
@property (nonatomic, retain) IBOutlet UIButton *synthButtonLarv;
@property (nonatomic, retain) IBOutlet UIButton *synthButtonAmoeb;
@property (nonatomic, retain) IBOutlet UIButton *synthButtonLarv1;
@property (nonatomic, retain) IBOutlet UIButton *synthButtonAmoeb1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeWater1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeFire1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeAir1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeEarth1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeDark1;
@property (nonatomic, retain) IBOutlet UIImageView *tomeLight1;
And here is the code from the (.m):
#import "TabSynth.h"
@implementation TabSynth
@synthesize tomeWater;
@synthesize tomeFire;
@synthesize tomeAir;
@synthesize tomeEarth;
@synthesize tomeDark;
@synthesize tomeLight;
@synthesize tomeWater1;
@synthesize tomeFire1;
@synthesize tomeAir1;
@synthesize tomeEarth1;
@synthesize tomeDark1;
@synthesize tomeLight1;
@synthesize airSynthButton;
@synthesize darkSynthButton;
@synthesize earthSynthButton;
@synthesize fireSynthButton;
@synthesize lightSynthButton;
@synthesize waterSynthButton;
@synthesize synthButtonLarv;
@synthesize synthButtonAmoeb;
@synthesize synthButtonLarv1;
@synthesize synthButtonAmoeb1;
-(void)viewDidLoad {
extern int gTomeAir;
extern int gTomeDark;
extern int gTomeEarth;
extern int gTomeFire;
extern int gTomeLight;
extern int gTomeWater;
extern int gAmoebaeNum;
extern int gLarvaeNum;
synthButtonAmoeb.hidden=YES;
synthButtonAmoeb1.hidden=NO;
synthButtonLarv.hidden=YES;
synthButtonLarv1.hidden=NO;
if (gTomeAir>0) {
tomeAir.hidden=NO;
tomeAir1.hidden=YES;
airSynthButton.hidden=NO;
}
if (gTomeDark>0) {
tomeDark.hidden=NO;
tomeDark1.hidden=YES;
darkSynthButton.hidden=NO;
}
if (gTomeEarth>0) {
tomeEarth.hidden=NO;
tomeEarth1.hidden=YES;
earthSynthButton.hidden=NO;
}
if (gTomeFire>0) {
tomeFire.hidden=NO;
tomeFire1.hidden=YES;
fireSynthButton.hidden=NO;
}
if (gTomeLight>0) {
tomeLight.hidden=NO;
tomeLight1.hidden=YES;
lightSynthButton.hidden=NO;
}
if (gTomeWater>0) {
tomeWater.hidden=NO;
tomeWater1.hidden=YES;
waterSynthButton.hidden=NO;
}
if (gAmoebaeNum > 0) {
synthButtonAmoeb.hidden=NO;
synthButtonAmoeb1.hidden=YES;
}
else {
synthButtonAmoeb.hidden=YES;
synthButtonAmoeb1.hidden=NO;
}
if (gLarvaeNum >= 1) {
synthButtonLarv.hidden=NO;
synthButtonLarv1.hidden=YES;
}
else {
synthButtonLarv.hidden=YES;
synthButtonLarv1.hidden=NO;
}
}
In the if statements, the external integers being called (gTome) were set equal to a number in the previous view. Any help at all would be great, and I apologize for the simpleness of my coding.