freshOS / KeyboardLayoutGuide

⌨️ KeyboardLayoutGuide, back from when it didn't exist.
MIT License
1.19k stars 59 forks source link

Provide option to use safe area or not #23

Closed moyerr closed 5 years ago

moyerr commented 5 years ago

Currently, if the device is running iOS 11 or newer, the keyboardLayoutGuide.bottomAnchor is always equal to the view's safeAreaLayoutGuide.bottomAnchor.

Sometimes it is nice to be able to pin views to the bottom of the screen, instead of the bottom of the safe area. It would be nice if there was a setting or parameter for determining whether or not the keyboardLayoutGuide uses the safe area.

s4cha commented 5 years ago

@moyerr This is a very good idea! the api would look like so:

// Opt out of safe area if needed.
view.keyboardLayoutGuide.usesSafeArea = false

I created https://github.com/freshOS/KeyboardLayoutGuide/pull/27 for it, let me know if that would fit your use case !

moyerr commented 5 years ago

@s4cha looks great! This does fit my use case perfectly!