Reputation: 3711
I have a NSMutableArray
and I would like to add values that are inputed into a UILabel
in a subclassed UIAlertView
that allows me to add subviews. The problem is that I have though is that the UIViewController
that I have to keep track of the score isn't receiving the inputed values since it is constantly returning a value of Nil.
Within the UIAlertVIew
controller I use NSNotificationCenter
to post a notification. The UIViewController that holds the score has a listener that checks for the update.
Here is the code for the method that is called when the IViewController
hears the notification
-(void)doneButtonPressed{
i++;
// g2RowIndex ++;
j = i -2;
k = i-3;
CustomUiAlertView *customAlertView;
NSLog(@"%@", customAlertView.p1G1ScoreLabel.text);
}
The scoreLabel belongs to the subclassed UIViewController
. I am wondering how to get the inputed values within the UILabel
to be placed in the scoreArray
within the socreViewController.
Upvotes: 0
Views: 44