iPhone - Cannont access to an IBOutlet (nil valued)
- by Oliver
Hello,
I have a problem acessing a IBOutlet.
I have a NIB inside which there is a tableview, a toolbar and an UILabel (encasulated into a view).
The controller (that is the file's owner) is defined as :
@interface ChoixPeriodeController : UIViewController <UITableViewDelegate> {
IBOutlet UILabel* __periodeInitialeLabel;
}
@property(nonatomic, retain) UILabel* periodeInitialeLabel;
- (void) setSelectedPeriode:(Tache_TypePeriode)typePeriode;
In the .m file, this function is called by the parent window to init the Label :
- (void) setSelectedPeriode:(Tache_TypePeriode)typePeriode {
NSMutableString* tmpString = [NSMutableString string];
[tmpString appendFormat:bla bla bla;....];
self.periodeInitialeLabel.text = tmpString;
}
Into this function, I can see that self.periodeInitialeLabel is at nil. I can't see why ? Everything is connected into IB... Do you see what can be the problem ?