diff --git a/FPPopoverController.m b/FPPopoverController.m index 28406d4..01a6650 100644 --- a/FPPopoverController.m +++ b/FPPopoverController.m @@ -243,7 +243,11 @@ -(void)presentPopoverFromPoint:(CGPoint)fromPoint //keep the first subview if(_window.subviews.count > 0) { - _parentView = [_window.subviews objectAtIndex:0]; + // add to the last UIView that is not a textview (work around for DCIntrospect) + [_window.subviews enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(UIView * view, NSUInteger idx, BOOL *stop) { + _parentView = view; + *stop = ![view isKindOfClass:[UITextView class]] && view.alpha != 0; + }]; [_parentView addSubview:self.view]; [_viewController viewDidAppear:YES]; }