Actually, i have some values calculated in my viewController.m of my project.And i use that final result in another class(uiview class) to draw that.But i can’t understand how can i use the calculated values in my other class of same project in iphone.
Actually, i have some values calculated in my viewController.m of my project.And i use
Share
Go with following steps
Declare the variables in delegate.h file
write @property for the variable
e.g.
@property (nonatomic, retain) NSString *string;Synthesize in delegate.m
@synthesize string;
In the class(.h) where you want to use it
//import yourDelegate.h
YourDelegate *mainDelegate;
In .m file
mainDelegate = [[UIApplication sharedApplication]delegate];