Permalink
Browse files

Minor source formatting.

Modified some comments and pragma statements.
  • Loading branch information...
epreston committed Aug 18, 2011
1 parent ab2419f commit 347003d5c28c2b81619ac0db99ac0f2ffe555592
@@ -16,8 +16,7 @@ @implementation PSHTreeGraphAppDelegate
@synthesize viewController;
-#pragma mark -
-#pragma mark Application Lifecycle
+#pragma mark - Application Lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -51,8 +50,7 @@ - (void)applicationWillTerminate:(UIApplication *)application {
}
-#pragma mark -
-#pragma mark Memory Management
+#pragma mark - Memory Management
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
// Free up as much memory as possible by purging cached data objects that can be recreated
@@ -14,11 +14,11 @@
#import "ObjCClassWrapper.h"
+
@implementation PSHTreeGraphViewController
-#pragma mark -
-#pragma mark Property Accessors
+#pragma mark - Property Accessors
@synthesize treeGraphView;
@@ -40,8 +40,7 @@ - (void)setRootClassName:(NSString *)newRootClassName {
}
-#pragma mark -
-#pragma mark View Creation and Initializer
+#pragma mark - View Creation and Initializer
// The designated initializer. Override to perform setup that is required before the view is loaded.
//- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
@@ -85,8 +84,7 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interf
}
-#pragma mark -
-#pragma mark TreeGraph Delegate
+#pragma mark - TreeGraph Delegate
-(void) configureNodeView:(UIView *)nodeView
withModelNode:(id <PSTreeGraphModelNode> )modelNode {
@@ -110,8 +108,7 @@ -(void) configureNodeView:(UIView *)nodeView
}
-#pragma mark -
-#pragma mark Memory Management
+#pragma mark - Memory Management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
@@ -21,8 +21,7 @@
}
-#pragma mark -
-#pragma mark Creating Instances
+#pragma mark - Creating Instances
// Returns an ObjCClassWrapper for the given Objective-C class. ObjCClassWrapper maintains
// a set of unique instances, so this will always return the same ObjCClassWrapper for a given Class.
@@ -35,8 +34,7 @@
+ (ObjCClassWrapper *)wrapperForClassNamed:(NSString *)aClassName;
-#pragma mark -
-#pragma mark Property Accessors
+#pragma mark - Property Accessors
// The wrappedClass' name (e.g. @"UIButton")
@@ -31,8 +31,7 @@ - (id)copyWithZone:(NSZone *)zone {
}
-#pragma mark -
-#pragma mark Creating Instances
+#pragma mark - Creating Instances
- initWithWrappedClass:(Class)aClass {
self = [super init];
@@ -64,8 +63,7 @@ + (ObjCClassWrapper *)wrapperForClassNamed:(NSString *)aClassName {
}
-#pragma mark -
-#pragma mark Property Accessors
+#pragma mark - Property Accessors
- (NSString *)name {
return NSStringFromClass(wrappedClass);
@@ -115,8 +113,7 @@ - (NSArray *)subclasses {
}
-#pragma mark -
-#pragma mark TreeGraphModelNode Protocol Conformance
+#pragma mark - TreeGraphModelNode Protocol
- (id <PSTreeGraphModelNode> )parentModelNode {
return [self superclassWrapper];
@@ -127,8 +124,7 @@ - (NSArray *)childModelNodes {
}
-#pragma mark -
-#pragma mark Memory Management
+#pragma mark - Memory Management
- (void)dealloc {
[subclassesCache release];
@@ -32,8 +32,7 @@ - (PSBaseTreeGraphView *)enclosingTreeGraph {
}
-#pragma mark -
-#pragma mark Path Drawing
+#pragma mark - Drawing
- (UIBezierPath *)directConnectionsPath {
CGRect bounds = [self bounds];
@@ -32,8 +32,7 @@
}
-#pragma mark -
-#pragma mark Styling
+#pragma mark - Styling
//The color of the ContainerView's stroked border.
@property(copy) UIColor *borderColor;
@@ -48,8 +47,7 @@
@property(copy) UIColor *fillColor;
-#pragma mark -
-#pragma mark Selection State
+#pragma mark - Selection State
@property BOOL showingSelected;
@@ -22,8 +22,7 @@
@implementation PSBaseLeafView
-#pragma mark -
-#pragma mark Update Layer
+#pragma mark - Update Layer
- (void)updateLayerAppearanceToMatchContainerView {
CALayer *layer = [self layer];
@@ -64,8 +63,7 @@ - (void)updateLayerAppearanceToMatchContainerView {
}
-#pragma mark -
-#pragma mark Initialization
+#pragma mark - Initialization
- (void)configureDetaults {
// Initialize ivars directly. As a rule, it's best to avoid invoking accessors from an -init...
@@ -94,8 +92,7 @@ - (void)awakeFromNib {
}
-#pragma mark -
-#pragma mark Drawing
+#pragma mark - Drawing
// Since we set each ContainerView's layerContentsRedrawPolicy to UIViewLayerContentsRedrawNever,
// this -drawRect: method will only be invoked if the ContainerView is window-backed. If the
@@ -129,8 +126,7 @@ - (void)awakeFromNib {
//}
-#pragma mark -
-#pragma mark Styling
+#pragma mark - Styling
- (UIColor *)borderColor {
return borderColor;
@@ -179,8 +175,7 @@ - (void)setFillColor:(UIColor *)color {
}
-#pragma mark -
-#pragma mark Selection State
+#pragma mark - Selection State
- (BOOL)showingSelected {
return showingSelected;
@@ -194,8 +189,7 @@ - (void)setShowingSelected:(BOOL)newShowingSelected {
}
-#pragma mark -
-#pragma mark Memory Management
+#pragma mark - Memory Management
- (void)dealloc {
[borderColor release];
@@ -67,15 +67,15 @@
@property(readonly,getter=isLeaf) BOOL leaf;
-#pragma mark Selection State
+#pragma mark - Selection State
// Whether the node is part of the TreeGraph's current selection. This can be a useful property to bind user
// interface state to.
@property(readonly) BOOL nodeIsSelected;
-#pragma mark Layout
+#pragma mark - Layout
//Returns YES if this subtree needs relayout.
@@ -108,7 +108,7 @@
- (IBAction)toggleExpansion:(id)sender;
-#pragma mark Invalidation
+#pragma mark - Invalidation
//Marks all BranchView instances in this subtree as needing display.
@@ -119,7 +119,7 @@
- (void)resursiveSetSubtreeBordersNeedDisplay;
-#pragma mark Node Hit-Testing
+#pragma mark - Node Hit-Testing
// Returns the visible model node whose nodeView contains the given point "p", where "p" is specified in the
// SubtreeView's interior (bounds) coordinate space. Returns nil if there is no node under the specified point.
@@ -133,7 +133,7 @@
- ( id <PSTreeGraphModelNode> )modelNodeClosestToY:(CGFloat)y;
-#pragma mark Debugging
+#pragma mark - Debugging
//Returns an indented multi-line NSString summary of the displayed tree. Provided as a debugging aid.
Oops, something went wrong.

0 comments on commit 347003d

Please sign in to comment.