0

The red color area is the area that is always "on top", thus it gets all my touches on the screen.

I found that tab bar has such an area that's always on top, and so that blocks all my touch events. Even if I programmatically add a UI button on top of the tab bar items, it also doesn't work.

So, what is it? And how can I remove such area?

TylerH
  • 20,799
  • 66
  • 75
  • 101
yaukit2000
  • 11
  • 1
  • 4

1 Answers1

0

you can try it

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
    let p = touches.first?.locationInView(self.window)
    if CGRectContainsPoint(UIApplication.sharedApplication().statusBarFrame, p!){
       // do something you want
    }

it is a window on the top of window,and window's windowLevel is StatusBar,it is above the keywindow.you can create a new window and set the alertLevel.

wenbo cao
  • 1
  • 1