Skip to content

Commit

Permalink
Removed redundent methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Chapman committed Aug 8, 2011
1 parent 7e9d328 commit 9461087
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/webcontroller/src/NIWebController.m
Expand Up @@ -102,34 +102,6 @@ - (void)updateToolbarWithOrientation:(UIInterfaceOrientation)interfaceOrientatio
_webView.frame = webViewFrame;
}

// Shoud this be moved into a Core Category??
///////////////////////////////////////////////////////////////////////////////////////////////////
- (UIView*)ancestorOrSelf:(UIView*)view withClass:(Class)cls {
if ([view isKindOfClass:cls]) {
return view;

} else if (view.superview) {
return [self ancestorOrSelf:view.superview withClass:cls];

} else {
return nil;
}
}

///////////////////////////////////////////////////////////////////////////////////////////////////
- (UIView*)descendantOrSelf:(UIView*)view withClass:(Class)cls {
if ([view isKindOfClass:cls])
return view;

for (UIView* child in view.subviews) {
UIView* it = [self descendantOrSelf:child withClass:cls];
if (it)
return it;
}
return nil;
}


///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
Expand Down

0 comments on commit 9461087

Please sign in to comment.