@@ -176,13 +176,12 @@ - (void)start
176
176
177
177
if (!self.inputTextView )
178
178
{
179
- self.inputTextView = [[UITextView alloc ] initWithFrame: CGRectMake (0 , 0 , 100 , 100 )];
179
+ self.inputTextView = [[UITextView alloc ] initWithFrame: CGRectMake (0 , - 100 , 100 , 100 )];
180
180
self.inputTextView .delegate = self;
181
181
self.inputTextView .autocorrectionType = UITextAutocorrectionTypeNo;
182
182
self.inputTextView .autocapitalizationType = UITextAutocapitalizationTypeNone;
183
183
self.inputTextView .inputView = [[UIView alloc ] init ];
184
184
self.inputTextView .scrollsToTop = NO ;
185
- self.inputTextView .hidden = YES ;
186
185
[mainWindow addSubview: self .inputTextView];
187
186
}
188
187
@@ -1592,21 +1591,20 @@ - (UIWindow *)mainWindow
1592
1591
- (NSMutableArray *)viewsAtPoint : (CGPoint)touchPoint inView : (UIView *)view
1593
1592
{
1594
1593
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
+ }
1610
1608
}
1611
1609
1612
1610
return views;
0 commit comments