mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 08:42:51 +00:00
Add rs_enclosingTableView method as NSView category.
This commit is contained in:
1 parent
765a91dd34
commit
1b09d35c77
2 files changed
+15
No files matched your search
@@ -27,5 +27,6 @@
|
||||
|
||||
- (NSRect)rs_rectCentered:(NSRect)originalRect;
|
||||
|
||||
- (NSTableView *)rs_enclosingTableView;
|
||||
|
||||
@end
|
||||
@@ -65,4 +65,18 @@
|
||||
}
|
||||
|
||||
|
||||
- (NSTableView *)rs_enclosingTableView {
|
||||
|
||||
NSView *nomad = self.superview;
|
||||
|
||||
while (nomad != nil) {
|
||||
if ([nomad isKindOfClass:[NSTableView class]]) {
|
||||
return nomad;
|
||||
}
|
||||
nomad = nomad.superview;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user