Want more features on Pastebin? Sign Up, it's FREE!
Guest

Coin Header File

By: a guest on Aug 15th, 2012  |  syntax: Objective C  |  size: 3.81 KB  |  views: 41  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //
  2. //  RollViewController.h
  3.  
  4.  
  5.  
  6. #import <UIKit/UIKit.h>
  7. #import <CoreMotion/CoreMotion.h>
  8.  
  9. #define kAccelerationThreshold  1.7
  10. #define kUpdateInterval (1.0f / 60.0f)
  11.  
  12. @interface TossViewController : UIViewController  <UIAccelerometerDelegate>{
  13.         IBOutlet UIImageView *imageView;
  14.         IBOutlet UIImageView *imageView2;
  15.         IBOutlet UIButton *toggleButton;
  16.         IBOutlet UISlider *animationSpeed;
  17.         IBOutlet UILabel *hopsPerSecond;
  18.         IBOutlet UILabel *startLabel;
  19.    
  20.     IBOutlet UILabel *coinOneA; // 0th          // The coinX labels
  21.     IBOutlet UILabel *coinOneB;
  22.     IBOutlet UILabel *coinOneC;
  23.     IBOutlet UILabel *coinOneD;
  24.     IBOutlet UILabel *coinOneE;
  25.     IBOutlet UILabel *coinOneF;
  26.     IBOutlet UILabel *coinOneG;
  27.     IBOutlet UILabel *coinOneH;
  28.     IBOutlet UILabel *coinOneI;
  29.     IBOutlet UILabel *coinOneJ; // 9th
  30.    
  31.     IBOutlet UILabel *coinTwoA; // 0th
  32.     IBOutlet UILabel *coinTwoB;
  33.     IBOutlet UILabel *coinTwoC;
  34.     IBOutlet UILabel *coinTwoD;
  35.     IBOutlet UILabel *coinTwoE;
  36.     IBOutlet UILabel *coinTwoF;
  37.     IBOutlet UILabel *coinTwoG;
  38.     IBOutlet UILabel *coinTwoH;
  39.     IBOutlet UILabel *coinTwoI;
  40.     IBOutlet UILabel *coinTwoJ; // 9th
  41.  
  42.    
  43.    
  44.     CMMotionManager *motionManager;
  45.    
  46.     NSMutableArray *headsHeads; // array is decalared for the images
  47.     NSMutableArray *headsTails; // array is decalared for the images
  48.     NSMutableArray *tailsTails; // array is decalared for the images
  49.     NSMutableArray *tailsHeads; // array is decalared for the images
  50.    
  51.        
  52. }
  53.  
  54. @property (retain, nonatomic) UIImageView *imageView;
  55. @property (retain, nonatomic) UIImageView *imageView2;
  56. @property (retain, nonatomic) UIButton *toggleButton;
  57. @property (retain, nonatomic) UISlider *animationSpeed;
  58. @property (retain, nonatomic) UILabel *hopsPerSecond;
  59. @property (retain, nonatomic) IBOutlet UILabel *startLabel;
  60.  
  61. @property (retain, nonatomic) IBOutlet UILabel *coinOneA;   // 0
  62. @property (retain, nonatomic) IBOutlet UILabel *coinOneB;
  63. @property (retain, nonatomic) IBOutlet UILabel *coinOneC;
  64. @property (retain, nonatomic) IBOutlet UILabel *coinOneD;
  65. @property (retain, nonatomic) IBOutlet UILabel *coinOneE;
  66. @property (retain, nonatomic) IBOutlet UILabel *coinOneF;
  67. @property (retain, nonatomic) IBOutlet UILabel *coinOneG;
  68. @property (retain, nonatomic) IBOutlet UILabel *coinOneH;
  69. @property (retain, nonatomic) IBOutlet UILabel *coinOneI;
  70. @property (retain, nonatomic) IBOutlet UILabel *coinOneJ;   // 9
  71.  
  72. @property (retain, nonatomic) IBOutlet UILabel *coinTwoA;   // 0
  73. @property (retain, nonatomic) IBOutlet UILabel *coinTwoB;
  74. @property (retain, nonatomic) IBOutlet UILabel *coinTwoC;
  75. @property (retain, nonatomic) IBOutlet UILabel *coinTwoD;
  76. @property (retain, nonatomic) IBOutlet UILabel *coinTwoE;
  77. @property (retain, nonatomic) IBOutlet UILabel *coinTwoF;
  78. @property (retain, nonatomic) IBOutlet UILabel *coinTwoG;
  79. @property (retain, nonatomic) IBOutlet UILabel *coinTwoH;
  80. @property (retain, nonatomic) IBOutlet UILabel *coinTwoI;
  81. @property (retain, nonatomic) IBOutlet UILabel *coinTwoJ;   // 9
  82.  
  83. @property (retain, nonatomic) NSMutableArray *headsHeads;       // array is decalared for the images
  84. @property (retain,nonatomic)  NSMutableArray *headsTails;       // array is decalared for the images
  85. @property (retain,nonatomic)  NSMutableArray *tailsTails;       // array is decalared for the images
  86. @property (retain,nonatomic)  NSMutableArray *tailsHeads;       // array is decalared for the images
  87. // note the assign 15
  88. // It wont let me release them in the dealloc, so im using assign
  89.  
  90.  
  91. @property (nonatomic, retain) CMMotionManager *motionManager;
  92.  
  93. -(IBAction)toggleAnimation:(id)sender;
  94. -(IBAction)setSpeed:(id)sender;
  95.  
  96. -(void) callValueFromSelect;
  97. -(void) accelerometer;
  98. -(void) rollTheDice;
  99. -(void) fillArrays;
  100. -(void) updateLabels;           // method to update the tracking of the labels
  101.  
  102. @end
clone this paste RAW Paste Data