Skip to content

Commit 46d6019

Browse files
committed
Expanding the DCIntrospect workaround, because it uses DCTextView under iOS7 (and above) but UITextView under pre-iOS7.
1 parent 817eb67 commit 46d6019

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,8 +1423,11 @@ - (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+
// Hrm. Seems that DCIntrospect installs a DCTextView under iOS7 and UITextView under pre-7. So
1427+
// we'll still use the presense of Class DCTextView as our key, then check for either TextView
1428+
// class at runtime.
14261429
Class DCTextView = NSClassFromString(@"DCTextView");
1427-
if (!view.isHidden && (!DCTextView || (DCTextView && ![view isKindOfClass:DCTextView])) )
1430+
if (!view.isHidden && (!DCTextView || (DCTextView && ![view isKindOfClass:DCTextView] && ![view isKindOfClass:[UITextView class]])) )
14281431
{
14291432
result = view;
14301433
break;

0 commit comments

Comments
 (0)