#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