title: Pass float to and from app delegate in iphone dev
body: <p>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):</p>
  
  <p><strong>app delegate.h</strong></p>
  
  <pre><code>@interface { 
      NSInteger accumulatedTime;
  }
  
  @property (nonatomic) NSInteger accumulatedTime;
  
  @end
  </code></pre>
  
  <p><strong>app delegate.m</strong></p>
  
  <pre><code>@implementation
  
  @synthesize accumulatedTime;
  </code></pre>
  
  <p>then in my view controller.h</p>
  
  <pre><code>@interface {
      int secs2;
  }
  </code></pre>
  
  <p><strong>view controller.m</strong></p>
  
  <pre><code>BetaTeam1AppDelegate *mainDelegate = (BetaTeam1AppDelegate *)[[UIApplication sharedApplication] delegate];
  
  secs2 = mainDelegate.accumulatedTime ;  
  </code></pre>
  
  <p>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?</p>