Skip to content

Commit 7982eea

Browse files
Merge pull request #48 from hijackwang/patch-1
Select first "rootView" which is not hidden by hijackwang
2 parents fd51c3a + 23c0819 commit 7982eea

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,12 @@ - (UIView *)rootView
14151415

14161416
if (result.subviews.count > 0)
14171417
{
1418-
result = [result.subviews lastObject];
1418+
for (UIView *view in result.subviews) {
1419+
if(!view.isHidden){
1420+
return view;
1421+
}
1422+
}
1423+
// result = [result.subviews lastObject];
14191424
}
14201425

14211426
return result;

0 commit comments

Comments
 (0)