开发者

changing of label's text from appdelegate not working

开发者 https://www.devze.com 2023-04-05 22:17 出处:网络
i have created a function in controllerappdelegate.m like below - (void) ChangeLabelText:(NSString *)SenderP

i have created a function in controllerappdelegate.m like below

- (void) ChangeLabelText:(NSString *)SenderP
{
    TeenTaalViewControllerM = [[TeenTaalViewController alloc]  initWithNibName:@"TeenTaalViewController" bundle:nil];    
    TeenTaalViewControllerM.view.hidden= NO;
    [self.TeenTaalViewControllerM.lblLoopCountM setText:@"testing ..."];    
    self.TeenTaalViewControllerM.lblLoopCountM.hidden = NO;

}

note:- i wanna change the text of label from another view .For that only i have declared this in controllerappdelegate.

i am calling this function from another view like below

ControllerApp开发者_运维百科Delegate * TheAppDelegateL = [[UIApplication sharedApplication] delegate];
[TheAppDelegateL ChangeLabelText:LoopCountTextL];

The function is getting called but the label's text is not changing .Please Help

Thanks in advance


maybe aViewControllerM is nil .

0

精彩评论

暂无评论...
验证码 换一张
取 消