Skip to content

Commit

Permalink
Code cleanup and appledocs update.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmchen committed Mar 7, 2012
1 parent f45634f commit df49a0a
Show file tree
Hide file tree
Showing 49 changed files with 357 additions and 97 deletions.
8 changes: 4 additions & 4 deletions WeViews/WeButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -212,9 +212,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
8 changes: 4 additions & 4 deletions WeViews/WeCustomImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -218,9 +218,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
8 changes: 4 additions & 4 deletions WeViews/WeCustomLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -255,9 +255,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
16 changes: 8 additions & 8 deletions WeViews/WeImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -205,9 +205,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand All @@ -216,9 +216,9 @@ - (id) initWithImage:(UIImage*) image {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand All @@ -227,9 +227,9 @@ - (id) initWithImage:(UIImage*) image highlightedImage:(UIImage*) highlightedIma
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
8 changes: 4 additions & 4 deletions WeViews/WeLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -214,9 +214,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
8 changes: 4 additions & 4 deletions WeViews/WeLink.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -217,9 +217,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
4 changes: 2 additions & 2 deletions WeViews/WePanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ - (CGSize) sizeThatFits:(CGSize) value {
CGSize layerSize = [layer sizeThatFits:value];
result = CGSizeMax(result, layerSize);
// if ([self debugLayout]) {
// WhereLogN(@"%@.layerSize = %@",
// WhereLogN(@"%@.layerSize = %@",
// layer.layout.layoutModeName,
// FormatCGSize(layerSize));
// }
Expand All @@ -279,7 +279,7 @@ - (CGSize) sizeThatFits:(CGSize) value {
}

// if ([self debugLayout]) {
// WhereLogN(@"in %@ = %@",
// WhereLogN(@"in %@ = %@",
// FormatCGSize(value),
// FormatCGSize(result));
// }
Expand Down
10 changes: 5 additions & 5 deletions WeViews/WeScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void) initDefaults {
self.autoresizingMask = UIViewAutoresizingNone;
self.opaque = YES;
mode = SCROLL_MODE_BOTH;

self.minimumZoomScale = 1.0f;
self.maximumZoomScale = 1.0f;
stretchWeight = 1.0f;
Expand All @@ -211,9 +211,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -222,9 +222,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
8 changes: 4 additions & 4 deletions WeViews/WeSpacer.m
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -201,9 +201,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
10 changes: 5 additions & 5 deletions WeViews/WeView.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ - (void) purge {

- (void) dealloc {
[self purge];

[super dealloc];
}

Expand All @@ -211,9 +211,9 @@ - (id) init {
__FAIL(@"could not allocate...");
return nil;
}

[self initDefaults];

return self;
}

Expand All @@ -222,9 +222,9 @@ - (id) initWithFrame:(CGRect) frame {
if (!self) {
__FAIL(@"could not allocate");
}

[self initDefaults];

return self;
}

Expand Down
10 changes: 5 additions & 5 deletions WeViews/WeViews.m
Original file line number Diff line number Diff line change
Expand Up @@ -413,25 +413,25 @@ + (UIFont*) findUIFont:(NSString*) fontName
return font;
}

+ (void) dumpUIHierarchyNaturalSizes:(UIView*) view
+ (void) dumpUIHierarchyNaturalSizes:(UIView*) view
indent:(int) indent {
NSMutableString* spacing = [NSMutableString string];
for (int i=0; i < indent; i++) {
[spacing appendString:@"\t"];
}
NSLog(@"%@%@.naturalSize: %@",
NSLog(@"%@%@.naturalSize: %@",
spacing,
[view class],
FormatSize([view sizeThatFits:view.superview.frame.size]));
for (UIView* subview in view.subviews) {
[self dumpUIHierarchyNaturalSizes:subview
[self dumpUIHierarchyNaturalSizes:subview
indent:indent + 1];

}
}

+ (void) dumpUIHierarchyNaturalSizes:(UIView*) view {
[self dumpUIHierarchyNaturalSizes:view
[self dumpUIHierarchyNaturalSizes:view
indent:0];
}

Expand Down
4 changes: 2 additions & 2 deletions WeViews/layouts/WePanelLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ - (void) updateItemScrolling:(UIView*) item {
UIScrollView* scrollView = (UIScrollView*) item;
scrollView.scrollEnabled = ((scrollView.contentSize.width > scrollView.frame.size.width) ||
(scrollView.contentSize.height > scrollView.frame.size.height));
// WhereLogN(@"item: %@, scrollView.scrollEnabled: %d, scrollView.contentSize: %@, scrollView.frame: %@",
// [item class],
// WhereLogN(@"item: %@, scrollView.scrollEnabled: %d, scrollView.contentSize: %@, scrollView.frame: %@",
// [item class],
// scrollView.scrollEnabled,
// FormatSize(scrollView.contentSize),
// FormatRect(scrollView.frame));
Expand Down
4 changes: 2 additions & 2 deletions WeViewsDemo/Classes/MockCodeGenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ + (MockItemCode*) getItemCode:(id) item
if ([item isKindOfClass:[UIView class]]) {
UIView* view = (UIView*) item;
UIColor* background = view.backgroundColor;

if ([view respondsToSelector:@selector(borderColor)] ||
[view respondsToSelector:@selector(borderWidth)]) {
WeView* weView = (WeView*) view;
Expand All @@ -631,7 +631,7 @@ + (MockItemCode*) getItemCode:(id) item
[self formatColor:borderColor]];
}
}

if ([self isColorClear:background]) {
if (addBackgroundColorIfClear) {
if (useBackgroundColorSetter) {
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion appledocs/Classes/HandlerGroup.html
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/SelectorHandler.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/SimpleNotificationHandler.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/SimpleNotifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/URLHandler.html
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/WeActionSheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
2 changes: 1 addition & 1 deletion appledocs/Classes/WeBaseObject.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h4 class="method-subtitle">Declared In</h4>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-04)</span><br />
<p><span class="copyright">&copy; 2012 charlesmchen. All rights reserved. (Last updated: 2012-03-07)</span><br />

<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 752)</a>.</span></p>

Expand Down
Loading

0 comments on commit df49a0a

Please sign in to comment.