I am working on an iphone app that has multiple view controllers. I'm currently able to pass an int value to and from the app delegate as follows (I want to use float instead!, but not sure how):
app delegate.h
@interface {
NSInteger accumulatedTime;
}
@property (nonatomic) NSInteger accumulatedTime;
@end
app delegate.m
@implementation
@synthesize accumulatedTime;
then in my view controller.h
@interface {
int secs2;
}
view controller.m
BetaTeam1AppDelegate *mainDelegate = (BetaTeam1AppDelegate *)[[UIApplication sharedApplication] delegate];
secs2 = mainDelegate.accumulatedTime ;
I want to use a float instead, Easy enough to change int to float in the view controllers .h and .m but how to code in the app delegate?