iphone - UILabel text not changed of another method other than ViewDidLoad -


uilabel not changed out of viewdidload method. how can change in method of label?

label text changed:

- (void)viewdidload{ label.text = @"testing"; } 

but, here label not changed

- (void)anothermethod { label.text = @"testing"; } 

also have ensure change of method(anothermethod) other viewdidload.

1) please check t hat in other method , label not nil.if nil means there not object in memory.

2) if getting nil try set property , check self.label.text = @"your text"

3) call method want, suggested in comment have call manually [self anothermethod];.viewdidload call automatically.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -