Skip to content

Commit 2410199

Browse files
committed
Merge pull request lukaswelte#6 from ksuther/master
Fixes for current iOS Versions
2 parents ced69df + 196ae62 commit 2410199

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

DCIntrospect.m

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,12 @@ - (void)start
176176

177177
if (!self.inputTextView)
178178
{
179-
self.inputTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
179+
self.inputTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, -100, 100, 100)];
180180
self.inputTextView.delegate = self;
181181
self.inputTextView.autocorrectionType = UITextAutocorrectionTypeNo;
182182
self.inputTextView.autocapitalizationType = UITextAutocapitalizationTypeNone;
183183
self.inputTextView.inputView = [[UIView alloc] init];
184184
self.inputTextView.scrollsToTop = NO;
185-
self.inputTextView.hidden = YES;
186185
[mainWindow addSubview:self.inputTextView];
187186
}
188187

@@ -1592,21 +1591,20 @@ - (UIWindow *)mainWindow
15921591
- (NSMutableArray *)viewsAtPoint:(CGPoint)touchPoint inView:(UIView *)view
15931592
{
15941593
NSMutableArray *views = [[NSMutableArray alloc] init];
1595-
for (UIView *subview in view.subviews)
1596-
{
1597-
CGRect rect = subview.frame;
1598-
if ([self shouldIgnoreView:subview])
1599-
continue;
1600-
1601-
if (CGRectContainsPoint(rect, touchPoint))
1602-
{
1603-
[views addObject:subview];
1604-
1605-
// convert the point to it's superview
1606-
CGPoint newTouchPoint = touchPoint;
1607-
newTouchPoint = [view convertPoint:newTouchPoint toView:subview];
1608-
[views addObjectsFromArray:[self viewsAtPoint:newTouchPoint inView:subview]];
1609-
}
1594+
1595+
if ([view pointInside:touchPoint withEvent:nil])
1596+
{
1597+
[views addObject:view];
1598+
1599+
for (UIView *subview in view.subviews)
1600+
{
1601+
if ([self shouldIgnoreView:subview])
1602+
continue;
1603+
1604+
CGPoint convertedTouchPoint = [view convertPoint:touchPoint toView:subview];
1605+
1606+
[views addObjectsFromArray:[self viewsAtPoint:convertedTouchPoint inView:subview]];
1607+
}
16101608
}
16111609

16121610
return views;

0 commit comments

Comments
 (0)