Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hulk committed May 18, 2022
1 parent e34301e commit 762ede5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ + (NSString*)getViewContentOfControl:(UIControl*)control {
// 兜底考虑把UIButton仅作为给父View添加触控能力的工具控件的场景(此时UIButton通常就是个空白按钮),此时向上遍历真正有意义的父级View。
if (!viewContent.length && [control isKindOfClass:[UIButton class]]) {
UIView *superView = control.superview;
if (superView && CGRectEqualToRect(control.frame, superView.bounds)) {
viewContent = [PrismInstructionContentUtil getRepresentativeContentOfView:superView needRecursive:YES];
if (superView && !CGRectIsEmpty(superView.bounds)) {
if (CGRectEqualToRect(control.frame, superView.bounds)
|| ((control.frame.size.width * control.frame.size.height) / (superView.bounds.size.width * superView.bounds.size.height) > 0.99)) {
viewContent = [PrismInstructionContentUtil getRepresentativeContentOfView:superView needRecursive:YES];
}
}
}
return viewContent;
Expand Down

0 comments on commit 762ede5

Please sign in to comment.