X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/22a86e1af594d77fde7f056cf5152478f14dafbf..7a218424c6a92eb4979564a7260f862edd46052d:/ITCategory-NSView.m?ds=inline diff --git a/ITCategory-NSView.m b/ITCategory-NSView.m old mode 100755 new mode 100644 index b2c8c0c..be4332b --- 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)]; } -@end +- (void)removeSubview:(NSView *)subview { + if ([subview superview] == self) { + [subview removeFromSuperview]; + } +} + +@end \ No newline at end of file