3

I have two view controllers 1.rootviewController 2.myStatusDisplayViewController.

I have c stack call back function which returns a c string.That particular call back function calls a function in my rootviewcontroller. In my rootview controller I have reference to myStatusDispalyViewController using that reference I'm trying to update the label in myStatusDisplayviewController.

app.myStatusDisplayViewController.displayCallStatus.text =updatedCallStatus;
[app.myStatusDisplayViewController viewDidLoad];
[app.myStatusDisplayViewController viewWillAppear:YES];
Jeeva
  • 1,791
  • 2
  • 23
  • 42
  • Jeeva are you setting text in Dispatch.Queue.main?? actually your problem is not 100% understandable – Dheeraj D Dec 08 '16 at 12:28
  • @DheerajD im completely new to objective c..so i dont know about DIspatch.queue.main.above code changes my label text but it is not getting updated in screen.but when i click some other buttons my label gets the updated string.i want to refresh my viewcontroller label without clicking my buttons.i hope u got my point.. – Jeeva Dec 08 '16 at 12:31

1 Answers1

0

Set your text in that block:

  dispatch_async(dispatch_get_main_queue(), ^{
     app.myStatusDisplayViewController.displayCallStatus.text =updatedCallStatus;
        });

Hope it will work.

Dheeraj D
  • 4,386
  • 4
  • 20
  • 34