Skip to content

Commit 6af87b2

Browse files
committed
And even more DCIntrospect workaround.
1 parent 46d6019 commit 6af87b2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,11 +1423,18 @@ - (UIView *)rootView
14231423
// the "last visible" subview. But as I cannot be 100% sure of the original author's intent, I'll
14241424
// instead work around our use of DCIntrospect by saying if that class exists, skip it because it
14251425
// certainly isn't the UIView we want.
1426+
//
14261427
// Hrm. Seems that DCIntrospect installs a DCTextView under iOS7 and UITextView under pre-7. So
14271428
// we'll still use the presense of Class DCTextView as our key, then check for either TextView
14281429
// class at runtime.
1430+
//
1431+
// It also seems to do the same with DCFrameView
14291432
Class DCTextView = NSClassFromString(@"DCTextView");
1430-
if (!view.isHidden && (!DCTextView || (DCTextView && ![view isKindOfClass:DCTextView] && ![view isKindOfClass:[UITextView class]])) )
1433+
Class DCFrameView = NSClassFromString(@"DCFrameView");
1434+
if (!view.isHidden
1435+
&& (!DCTextView || (DCTextView && ![view isKindOfClass:DCTextView] && ![view isKindOfClass:[UITextView class]]))
1436+
&& (!DCFrameView || (DCFrameView && ![view isKindOfClass:DCFrameView]))
1437+
)
14311438
{
14321439
result = view;
14331440
break;

0 commit comments

Comments
 (0)