[ios] Fix active filtering in hitTest to return the last (top-most) view

This commit is contained in:
Alex Lau
2019-02-07 23:28:12 +08:00
parent 24e467d202
commit a841eec7b5
+1 -1
View File
@@ -169,7 +169,7 @@
NSPredicate *const anyActive = [NSPredicate predicateWithFormat:@"active == TRUE"];
NSArray *const filtered = [self.subviews filteredArrayUsingPredicate:anyActive];
if ([filtered count] != 0) {
return [filtered.firstObject hitTest:transformed withEvent:event];
return [filtered.lastObject hitTest:transformed withEvent:event];
}
}