In my appDelegate, I override touchesBegan
to detect when the status bar is clicked:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
CGPoint location = [[[event allTouches] anyObject] locationInView:kWindow];
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
if (CGRectContainsPoint(statusBarFrame, location)) {
///do something
}
}
Before iOS 13, this worked; on iOS 13, it does not. The method is never executed. How can I fix this?