I can't for the life of me figure out why this won't work. I'm trying to display a label after determining a boolean condition. No matter what I do, the label won't display. So in a pathetic desperate attempt, I put the code to display the label inside a button event to force it to display. Now it works perfectly (from the button click). But it still won't work from the boolean condition!

This is in viewDidLoad (note that the 'true' is just to isolate where the fault is):

if (true) [self showSubscribeLabel];

This is from the button click:

- (IBAction)askUserToSubscribe:(id)sender {
    [self showSubscribeLabel];
}

-(void) showSubscribeLabel {

    NSLog(@"here");
    self.subscribeLabel.hidden = NO;
    [self.view bringSubviewToFront:self.viewUnauthorized];

}

I see the output here when the controller loads and then again after clicking the button. What am I doing wrong? Thanks!

Related posts

Recent Viewed