I have been trying to figure this out for the last couple of hours and still cannot figure it out or find anything related that might help me out.
I have a method showFriendRequestData
and this method makes a server call to get a JSON response. I take my data that I get back and store it into an NSMutableArray
. I than make an NSString object and store the total amount of items in the array to a string value.
I then add the value to a UILabel object and try to display it. I have tried calling this method showFriendRequestData
in my viewDidAppear
method like this.
-(void)viewDidAppear:(BOOL)animated{
[self showFriendRequestData];
}
But ONLY when I leave the mainViewController and go BACK does the label update..... Make no sense. Am I calling this method I made in the wrong place?? Any help or guidance would be great. I want the label to update the moment I login into my main view controller.