I created a TutorialScreen
subclass of UIView
, and in a xib file I created three UIView
s of that type and used them in another class by bringing those objects into UIView
s:
self.tutorialScreen1 = [[[NSBundle mainBundle] loadNibNamed:@"View" owner:nil options:nil] objectAtIndex:0];
self.tutorialScreen1.translatesAutoresizingMaskIntoConstraints = NO;
self.tutorialScreen1.layer.cornerRadius = 8.0;
self.tutorialScreen1.alpha = 0.0;
[self.notificationWindow addSubview:self.tutorialScreen1];
In the xib file, each UIView
has a UILabel
in the middle that I created an outlet for (and linked all three UIView
s to), called textLabel
.
But in that class I created tutorialScreen1
in, when I do the following:
NSLog(@"%@", self.tutorialScreen3.textLabel.text);
Every time that outputs (null)
. Why on earth is it doing that? The label is explicitly set to "text" so I don't see why it keeps calling it null. I can't manipulate it at all because the label doesn't seem to exist.