From c49bfadb9c85dd24a45c50fa0090869acd30c82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 15 Jul 2021 14:51:19 +0800 Subject: [PATCH] add view id display --- .../Classes/DoricShowNodeTreeViewCell.m | 23 +++++++- .../Classes/DoricShowNodeTreeViewController.m | 52 ++++++------------- doric-iOS/Pod/Classes/Shader/DoricSuperNode.h | 4 +- doric-iOS/Pod/Classes/Shader/DoricSuperNode.m | 16 ++++++ 4 files changed, 57 insertions(+), 38 deletions(-) diff --git a/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewCell.m b/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewCell.m index 3fba2886..f2afb3a9 100644 --- a/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewCell.m +++ b/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewCell.m @@ -29,16 +29,33 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { + NSString *base64 = @"iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAaZUlEQVR4Xu2dCbAuRXXH/2QRylLRQjASA0SNIlIBoyBuoBIXiCtuqEHEBQwaDUZcEncsIRjXiCaKW3AXRaMJYsAoMQmKRjFPVCIquAWEMqhlglVUUr/7eh7f++63nNPTPd98M+dUTd377jt9uvv0/Ke3s+ygoJoauL0knr0l7SLpRpJuPPVz+m+052eSfj7xc/L35v+ulvQNSd9MT81+jFb2DqPtebmO3zyBYBIMze/lalkuqQHKJGj421XLiwbHPA0EQPzvxl6S7i3pkPSTf/eZvi3pvPT8i6Tv97mxfWtbAGT5iAAAwHCP9OyzvEivOS6S9GlJ/5aeAMyC4QqAzFbOfSQ9WNI9JR3Q69e9feMAygWSPi7pn9qLG5aEAMj147mHpEekh9lijMQS7MPpuXyMCpjucwBk60zRAIMTpaCtJ2gNUJhZRktjBQ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Icon = [[UIImageView new] also:^(UIImageView *it) { it.width = 20; it.height = 20; + it.left = 5; it.contentMode = UIViewContentModeScaleToFill; [self.contentView addSubview:it]; + + NSData *imageData = [[NSData alloc] initWithBase64EncodedString:base64 + options:NSDataBase64DecodingIgnoreUnknownCharacters]; + it.image = [UIImage imageWithData:imageData]; + + it.userInteractionEnabled = YES; + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClick:)]; + [it addGestureRecognizer:tapGestureRecognizer]; }]; - self.nodeNameLabel = [[UILabel new] also:^(UIImageView *it) { + self.nodeNameLabel = [[UILabel new] also:^(UILabel *it) { it.contentMode = UIViewContentModeScaleToFill; it.left = 30; + UIFont *font = it.font; + if (font) { + it.font = [it.font fontWithSize:12]; + } else { + it.font = [UIFont systemFontOfSize:12]; + } [self.contentView addSubview:it]; }]; } @@ -52,4 +69,8 @@ - (void)layoutSubviews { self.nodeNameLabel.centerY = self.contentView.height / 2; } +- (void)onClick:(UITapGestureRecognizer *)recognizer { + +} + @end diff --git a/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewController.m b/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewController.m index 40222f0c..c5041366 100644 --- a/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewController.m +++ b/doric-iOS/Devkit/Classes/DoricShowNodeTreeViewController.m @@ -29,8 +29,6 @@ @interface DoricShowNodeTreeViewController () @property(nonatomic, weak) DoricContext *doricContext; -@property(nonatomic, weak) NSString *collapse; -@property(nonatomic, weak) NSString *expand; @end @implementation DoricShowNodeTreeViewController @@ -38,9 +36,6 @@ @implementation DoricShowNodeTreeViewController - (void)viewDidLoad { [super viewDidLoad]; - self.collapse = @"iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAWIElEQVR4Xu2de5Tc9HXH79Wu7RpDAg3gBA4JIYEEOBAO0FAoCS55EEOA3ZW0tvFKYxuzo1ljwOFVnsa8Eh4xEOMdzWLsHck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9RCSXFMsqfvSKoE4QJ1nA1G9zs7It3/Vmyn+cC6da8ppiiyCAJikGk+RZK9vQfTdiN8TnJeQ6dC+Oq7DgjMgYGBnQ2NK8H2ICAGacIJkUwm5wRzD3ca8LvxaraEsKFcshc1IXXtpxCDNPEUiGet9UjQw5yy6Ds2d/9FZgr6yMUgTe51IpMrAKLSCU4AXyk7NmvfxSaX2/bTiUFmoIWJjHUnICyvb2q61XeKV9ankdFcAmIQLkFFfcK0vggAV9cov8F37BU1jpVhDSQgBmkgzHpDJbL5a4Hopql0SHCV59rczW/qTU3GTxAQg8zwqZDI5va/wSjhct8trJrhFLWeXgzSAu2PZ/JLEOnu3VMhhL5yyS60QHpapyAGaZH2x03rQgQYX1AB6UK/VFzfIqlpnYYYpIXaH8/musJ0yqXiSAulpXUqYhCt2y/FRxEQg0QRkuNaExCDaN1+KT6KgBgkipAc15qAGETr9kvxUQTEIFGE5LjWBMQgWrdfio8iIAaJIiTHtSYgBtG6/VJ8FAExSBQhOa41ATGI1u2X4qMIiEGiCMlxrQmIQbRuvxQfRUAMEkVIjmtNQAyidful+CgCYpAoQnJcawJiEK3bL8VHERCDRBGS41oTEINo3X4pPoqAGCSKkBzXmoAYROv2S/FRBMQgUYTkuNYExCBat1+KjyIgBokiJMe1JiAG0br9UnwUATFIFCE5rjUBMYjW7ZfiowiIQaIIyXGtCYhBtG6/FB9FQAwSRUiOa01ADKJ1+6X4KAJikChCclxrAmIQrdsvxUcREINEEZLjWhMQg2jdfik+ioAYJIqQHNeagBhE6/ZL8VEExCBRhOS41gTEIFq3X4qPIiAGiSIkx7UmIAbRuv1SfBQBMUgUITmuNQExiNbtl+KjCIhBogjJca0JiEG0br8UH0VADBJFSI5rTUAMonX7pfgoAv8P7isVI5gCJAIAAAAASUVORK5CYII="; - self.doricContext = [[DoricContextManager instance] getContext:self.contextId]; RATreeView *treeView = [[RATreeView alloc] initWithFrame:self.view.bounds]; @@ -57,30 +52,31 @@ - (void)viewDidLoad { - (nonnull UITableViewCell *)treeView:(nonnull RATreeView *)treeView cellForItem:(nullable id)item { DoricShowNodeTreeViewCell *cell = [treeView dequeueReusableCellWithIdentifier:@"cell"]; - cell.nodeNameLabel.text = [item description]; + DoricViewNode *viewNode = (DoricViewNode *)item; + + NSString *viewId = [[@" <" stringByAppendingString:viewNode.viewId] stringByAppendingString:@"> "]; + cell.nodeNameLabel.text = [NSStringFromClass([item class]) stringByAppendingString:viewId]; [cell.nodeNameLabel sizeToFit]; - if ([item isKindOfClass:[DoricGroupNode class]]) { - NSData *imageData = [[NSData alloc] initWithBase64EncodedString:self.collapse - options:NSDataBase64DecodingIgnoreUnknownCharacters]; - cell.nodeIcon.image = [UIImage imageWithData:imageData]; - } else { - cell.nodeIcon.image = nil; - } - NSInteger indent = [treeView levelForCellForItem:item]; - cell.nodeIcon.left = indent * 30; - cell.nodeNameLabel.left = 30 + indent * 30; + cell.nodeIcon.left = 5 + indent * 20; + cell.nodeNameLabel.left = 30 + indent * 20; + return cell; } - (nonnull id)treeView:(nonnull RATreeView *)treeView child:(NSInteger)index ofItem:(nullable id)item { if (item == nil) { return self.doricContext.rootNode; - } else { + } else if ([item isKindOfClass:[DoricGroupNode class]]) { DoricGroupNode *groupNode = item; return groupNode.childNodes[index]; + } else if ([item isKindOfClass:[DoricSuperNode class]]) { + DoricSuperNode *superNode = item; + NSArray *viewIds = [superNode getSubNodeViewIds]; + return [superNode subNodeWithViewId:viewIds[index]]; } + return nil; } - (NSInteger)treeView:(nonnull RATreeView *)treeView numberOfChildrenOfItem:(nullable id)item { @@ -89,6 +85,9 @@ - (NSInteger)treeView:(nonnull RATreeView *)treeView numberOfChildrenOfItem:(nul } else if ([item isKindOfClass:[DoricGroupNode class]]) { DoricGroupNode *groupNode = item; return groupNode.childNodes.count; + } else if ([item isKindOfClass:[DoricSuperNode class]]) { + DoricSuperNode *superNode = item; + return [superNode getSubNodeViewIds].count; } return 0; } @@ -96,23 +95,4 @@ - (NSInteger)treeView:(nonnull RATreeView *)treeView numberOfChildrenOfItem:(nul - (CGFloat)treeView:(RATreeView *)treeView heightForRowForItem:(id)item { return 50; } - -- (void)treeView:(RATreeView *)treeView willExpandRowForItem:(id)item { - if ([item isKindOfClass:[DoricGroupNode class]]) { - DoricShowNodeTreeViewCell *cell = (DoricShowNodeTreeViewCell *)[treeView cellForItem:item]; - - NSData *imageData = [[NSData alloc] initWithBase64EncodedString:self.expand - options:NSDataBase64DecodingIgnoreUnknownCharacters]; - cell.nodeIcon.image = [UIImage imageWithData:imageData]; - } -} - -- (void)treeView:(RATreeView *)treeView willCollapseRowForItem:(id)item { - if ([item isKindOfClass:[DoricGroupNode class]]) { - DoricShowNodeTreeViewCell *cell = (DoricShowNodeTreeViewCell *)[treeView cellForItem:item]; - NSData *imageData = [[NSData alloc] initWithBase64EncodedString:self.collapse - options:NSDataBase64DecodingIgnoreUnknownCharacters]; - cell.nodeIcon.image = [UIImage imageWithData:imageData]; - } -} @end diff --git a/doric-iOS/Pod/Classes/Shader/DoricSuperNode.h b/doric-iOS/Pod/Classes/Shader/DoricSuperNode.h index 94b65039..ce9640a3 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricSuperNode.h +++ b/doric-iOS/Pod/Classes/Shader/DoricSuperNode.h @@ -38,4 +38,6 @@ - (DoricViewNode *)subNodeWithViewId:(NSString *)viewId; - (void)recursiveMixin:(NSDictionary *)srcModel to:(NSMutableDictionary *)targetModel; -@end \ No newline at end of file + +- (NSArray *)getSubNodeViewIds; +@end diff --git a/doric-iOS/Pod/Classes/Shader/DoricSuperNode.m b/doric-iOS/Pod/Classes/Shader/DoricSuperNode.m index b1a76799..49929f3b 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricSuperNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricSuperNode.m @@ -128,4 +128,20 @@ - (DoricViewNode *)subNodeWithViewId:(NSString *)viewId { NSStringFromSelector(_cmd)); return nil; } + +- (NSArray *)getSubNodeViewIds { + NSMutableArray *discardedItems = [NSMutableArray array]; + + NSMutableArray *allKeys = [[NSMutableArray alloc]init]; + allKeys = [NSMutableArray arrayWithArray:[self.subNodes allKeys]]; + for (NSString *key in allKeys) { + if ([self subNodeWithViewId:key] == nil) { + [discardedItems addObject:key]; + } + } + + [allKeys removeObjectsInArray:discardedItems]; + + return allKeys; +} @end