How can I reload data of UIVIewcontroller
from the UIView
.Actually I have a UIVIewController
which has a Custom class class of UIView
.Now In UIViewcontroller
i have a label and i need to print values of label which is been defined in the UIView
.
but viewdidload
of the UIViewController
is been compiled firstly then compiler moves to UIView
.then how can I print or Reload the UIVIewController
. UILabel Text
I have defined in the ViewDidLoad
of UIViewController
and values taken from the UIView
class
So How can I reload the UIViewController
.
what I am doing is:
UIVIewController(thirdTab) class
-(void)viewDidLoad{
[self reloadInputViews1];
}
-(void)reloadInputViews1{
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
// labelPrint.text=appDelegate.dayPrint;
[self.labelPrint setText:labelPrint.text];
}
UIView class
- (void)drawRect:(CGRect)rect {
AppDelegate* appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.dayPrint=theDate;
NSLog(@"appde%@",appDelegate.dayPrint);
[appDelegate.thirdTab reloadInputViews1];
}
But this does not work ...I am not able to print values in the label.how to do that..to get values from the UIViews