How to remove the status bar when a TouchID alert appears?

I am trying to hide the status bar on my entire application. However, the status bar appears when a TouchID warning from the application appears.

In my file, AppDelegate.swiftI added the line:
application.statusBarHidden = true

This is not like the case when the TouchID function appears. Is there anything specific for this case?

+4
source share
2 answers

I know him late, but for those who are still facing the same problem. This is not Apple's mistake. You have to solve it yourself.

I tested it with iOS 9, 10, 11 and its work. Follow these steps:

  • Open info.plist
  • " " NO
  • " " ​​ YES

:)

+1

, . , Apple .

. 0,2 .

// Add this in the function that calls Touch ID
var dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(0.2 * Double(NSEC_PER_SEC)))
  dispatch_after(dispatchTime, dispatch_get_main_queue(), {
    self.hideStatusBar()
  })


// Add this function
func hideStatusBar () {
  UIApplication.sharedApplication().statusBarHidden = true
}
0

All Articles