Skip to content

Commit

Permalink
feat( CustomKeyboardObject ): reduce height of custom keyboard avoidi…
Browse files Browse the repository at this point in the history
…ng hide standard keyboard topper
  • Loading branch information
bsorrentino committed Sep 14, 2022
1 parent 421ad9e commit 695fc0a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Combine
import SwiftUI
import PlantUMLFramework


public class CustomKeyboardObject : ObservableObject {
Expand Down Expand Up @@ -80,7 +79,12 @@ public class CustomKeyboardObject : ObservableObject {

let controller = UIHostingController( rootView: PlantUMLKeyboardView( customKeyboard: self ) )
self.controller = controller
controller.view.frame = CGRect( origin: keyboardRect.origin, size: keyboardRect.size )

let MAGIC_NUMBER = 50.0 // magic number .. height of keyboard top bar
var customKeyboardRect = keyboardRect
customKeyboardRect.origin.y += MAGIC_NUMBER
customKeyboardRect.size.height -= MAGIC_NUMBER
controller.view.frame = customKeyboardRect
keyboardWindow.addSubview( controller.view )


Expand Down

0 comments on commit 695fc0a

Please sign in to comment.