i am new to ios. I have a viewController, where in there is a notification observer.
For example
-(void) myNotificationObFn:(Notification *)noti
{
/* Here i am trying to change the text of UILabel, which is not working.
ie:
NSString *ns = [NSString stringWithFormat:@"%d", 10];
mylabel.text = ns;
*/
}
How can i resolve this issue ?
try using the tag function if you want to change the label
examples :
if you create the label programmatically, set the tag of your label after you create it for the first time
if you create the label in your XIB or storyboard, just change the “tag” field
this way, your label get a tag “1234”
after this, if you need to edit this label , on your notification method put this code
good luck :]
edit : also, is this notification reside in the same class / controller as ur UILabel?