Skip to content
Browse files

Moved dealloc from internal implementation block

Dealloc was placed in the (internal) category but was supposed to be in
the implementation.  Other updates are minor source formatting from
review.
  • Loading branch information...
1 parent 9816afd commit 195758b43a6cdcdb27d9d7eea981df5776573df6 @epreston committed Sep 3, 2011
View
7 Example 1/Classes/View/PSHLeafView.h
@@ -11,8 +11,11 @@
#import "PSBaseLeafView.h"
-@interface PSHLeafView : PSBaseLeafView {
-
+@interface PSHLeafView : PSBaseLeafView
+{
+
+@private
+
// Interface
UIButton *expandButton;
UILabel *titleLabel;
View
3 Example 1/Classes/View/PSHTreeGraphView.h
@@ -11,7 +11,8 @@
#import "PSBaseTreeGraphView.h"
-@interface PSHTreeGraphView : PSBaseTreeGraphView {
+@interface PSHTreeGraphView : PSBaseTreeGraphView
+{
// TODO: Place project specific code, extentions here.
}
View
3 PSTreeGraphView/PSBaseTreeGraphView.h
@@ -44,7 +44,8 @@ typedef NSInteger PSTreeGraphOrientationStyle;
-@interface PSBaseTreeGraphView : UIView {
+@interface PSBaseTreeGraphView : UIView
+{
@private
// Model
View
58 PSTreeGraphView/PSBaseTreeGraphView.m
@@ -35,25 +35,25 @@ @implementation PSBaseTreeGraphView
- (void) configureDetaults
{
- [self setBackgroundColor: [UIColor colorWithRed:0.55 green:0.76 blue:0.93 alpha:1.0]];
+ [self setBackgroundColor: [UIColor colorWithRed:0.55f green:0.76f blue:0.93f alpha:1.0f]];
//[self setClipsToBounds:YES];
// Initialize ivars directly. As a rule, it's best to avoid invoking accessors from an -init... method,
// since they may wrongly expect the instance to be fully formed.
modelNodeToSubtreeViewMapTable = [[NSMutableDictionary dictionaryWithCapacity:10] retain];
connectingLineColor = [[UIColor blackColor] retain];
- contentMargin = 20.0;
- parentChildSpacing = 50.0;
- siblingSpacing = 10.0;
+ contentMargin = 20.0f;
+ parentChildSpacing = 50.0f;
+ siblingSpacing = 10.0f;
animatesLayout = YES;
resizesToFillEnclosingScrollView = YES;
treeGraphOrientation = PSTreeGraphOrientationStyleHorizontal ;
layoutAnimationSuppressed = NO;
connectingLineStyle = PSTreeGraphConnectingLineStyleOrthogonal ;
- connectingLineWidth = 1.0;
+ connectingLineWidth = 1.0f;
showsSubtreeFrames = NO;
- minimumFrameSize = CGSizeMake(2.0 * contentMargin, 2.0 * contentMargin);
+ minimumFrameSize = CGSizeMake(2.0f * contentMargin, 2.0f * contentMargin);
selectedModelNodes = [[NSMutableSet alloc] init];
// [self setLayerContentsRedrawPolicy:UIViewLayerContentsRedrawNever];
@@ -74,6 +74,23 @@ - (void) awakeFromNib
[self configureDetaults];
}
+#pragma mark - Resource Management
+
+- (void) dealloc
+{
+ // iOS 4.0 and above ONLY
+ // [cachedNodeViewNib release];
+
+ self.delegate = nil;
+
+ [nodeViewNibBundle release];
+ [nodeViewNibName release];
+ [selectedModelNodes release];
+ [modelRoot release];
+ [modelNodeToSubtreeViewMapTable release];
+ // [backgroundColor release];
+ [super dealloc];
+}
#pragma mark - Root SubtreeView Access
@@ -87,7 +104,8 @@ - (PSBaseSubtreeView *) rootSubtreeView
@synthesize nodeViewNibName;
-- (void)setNodeViewNibName:(NSString *)newName {
+- (void)setNodeViewNibName:(NSString *)newName
+{
if (nodeViewNibName != newName) {
// iOS 4.0 and above ONLY
@@ -102,7 +120,8 @@ - (void)setNodeViewNibName:(NSString *)newName {
@synthesize nodeViewNibBundle;
-- (void) setNodeViewNibBundle:(NSBundle *)newBundle {
+- (void) setNodeViewNibBundle:(NSBundle *)newBundle
+{
if (nodeViewNibBundle != newBundle) {
// iOS 4.0 and above ONLY
@@ -203,8 +222,8 @@ - (CGRect) selectionBounds
#pragma mark - Graph Building
-- (PSBaseSubtreeView *) newGraphForModelNode:(id <PSTreeGraphModelNode> )modelNode {
-
+- (PSBaseSubtreeView *) newGraphForModelNode:(id <PSTreeGraphModelNode> )modelNode
+{
NSParameterAssert(modelNode);
PSBaseSubtreeView *subtreeView = [[PSBaseSubtreeView alloc] initWithModelNode:modelNode];
@@ -919,23 +938,4 @@ - (BOOL) modelNodeIsInAssignedTree:(id <PSTreeGraphModelNode> )modelNode
}
}
-
-#pragma mark - Resource Management
-
-- (void) dealloc
-{
- // iOS 4.0 and above ONLY
- // [cachedNodeViewNib release];
-
- self.delegate = nil;
-
- [nodeViewNibBundle release];
- [nodeViewNibName release];
- [selectedModelNodes release];
- [modelRoot release];
- [modelNodeToSubtreeViewMapTable release];
- // [backgroundColor release];
- [super dealloc];
-}
-
@end

0 comments on commit 195758b

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