Skip to content
Browse files

Moved private ivars into class extension

  • Loading branch information...
1 parent ba470e7 commit 5b4c174acc20a5602c5db38ae88f0bce4e725c91 Brad Benson committed Jan 26, 2012
Showing with 20 additions and 15 deletions.
  1. +1 −8 F3SwirlyDemo/F3Swirly.h
  2. +19 −7 F3SwirlyDemo/F3Swirly.m
View
9 F3SwirlyDemo/F3Swirly.h
@@ -46,14 +46,7 @@
BOOL m_fRoundedSegments; // true = segments have rounded ends
CGFloat m_flValue, // Current value being shown
m_flThickness; // Thickness of swirly
- int m_iSegments, // Number of segments
- m_iCurrentRpm; // Current RPM of swirly
- CALayer *m_swirlyLayer; // Layer containing the animated swirly
- CABasicAnimation *m_swirlyAnim, // Swirly animation object (continuous)
- *m_transitionAnim; // Transition animation object
- F3SwirlyThreshold *m_currentThreshold; // Current threshold (value/color) object
- F3SwirlyLayerDelegate *m_layerDelegate; // Layer delegate
- NSMutableArray *m_aThresholds; // Array of threshold objects
+ int m_iSegments; // Number of segments
}
// Properties
View
26 F3SwirlyDemo/F3Swirly.m
@@ -155,17 +155,29 @@ -(void) drawLayer:(CALayer *)a_layer
#pragma mark - Class Implementation
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-//---------------| F3Swirly class implementation |------------------
+//-----------------| F3Swirly class implementation |--------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-//===[ Category for private methods ]=====================================
+//===[ Class extension for private stuff ]================================
@interface F3Swirly()
- -(void) setDefaults;
- -(void) createLayers;
- -(id) findThreshold:(double) a_flValue;
- -(void) startSwirly:(int) a_iRpm;
- -(void) stopSwirly;
+{
+ @private
+ int m_iCurrentRpm; // Current RPM of swirly
+ CALayer *m_swirlyLayer; // Layer containing the animated swirly
+ CABasicAnimation *m_swirlyAnim, // Swirly animation object (continuous)
+ *m_transitionAnim; // Transition animation object
+ F3SwirlyThreshold *m_currentThreshold; // Current threshold (value/color) object
+ F3SwirlyLayerDelegate *m_layerDelegate; // Layer delegate
+ NSMutableArray *m_aThresholds; // Array of threshold objects
+}
+
+// Private methods
+-(void) setDefaults;
+-(void) createLayers;
+-(id) findThreshold:(double) a_flValue;
+-(void) startSwirly:(int) a_iRpm;
+-(void) stopSwirly;
@end

0 comments on commit 5b4c174

Please sign in to comment.
Something went wrong with that request. Please try again.