Added an instance method to NSMenu that will remove all of the items in
[ITKit.git] / ITCategory-NSView.m
1 #import "ITCategory-NSView.h"
2
3
4 @implementation NSView (ITCategory)
5
6 - (void)removeAllSubviews {
7     [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
8 }
9
10 - (void)removeSubview:(NSView *)subview {
11         if ([subview superview] == self) {
12                 [subview removeFromSuperview];
13         }
14 }
15
16 @end