velikanov / SwiftPasscodeLock

An iOS passcode lock with TouchID authentication written in Swift.
MIT License
199 stars 52 forks source link

mainWindow's windowLevel should not be changed #48

Open bull-xu opened 7 years ago

bull-xu commented 7 years ago

Changing the main window's windowLevel will cause some unexpected issues, such as using the library with Intercom: https://github.com/intercom/intercom-ios because the Intercom window is using windowLevel = 0.1 or some other values.

This library should use a value less than 0 to be the windowLevel for it's private passcodeLockWindow, and never change the windowLevel of the main window.

When presenting the passcodeLockWindow, it's window level can be a bigger number (such UIWindowLevelStatusBar - 1), but once it's dismissed, it should be set back to a number less than UIWindowLevelNormal.

ziogaschr commented 7 years ago

Sounds good indeed. Thanks for all the info shared. Are you @bull-xu-stride willing to open a PR for this one?