X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/22a86e1af594d77fde7f056cf5152478f14dafbf..21d518f55b0ffbe665ccd04a53d67d2ed1d66149:/ITCategory-NSView.m diff --git a/ITCategory-NSView.m b/ITCategory-NSView.m old mode 100755 new mode 100644 index b2c8c0c..9016162 --- a/ITCategory-NSView.m +++ b/ITCategory-NSView.m @@ -1,10 +1,15 @@ #import "ITCategory-NSView.h" - -@implementation NSView (ITCategory) +@implementation NSView (ITKitCategory) - (void)removeAllSubviews { - [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; +} + +- (void)removeSubview:(NSView *)subview { + if ([subview superview] == self) { + [subview removeFromSuperview]; + } } -@end +@end \ No newline at end of file