InputView of the SlackTextViewController is behind keyboard

329 views Asked by At

I'm using the SlackTextViewController.

Before It works fine but now I got a problem.

  • When I tapped inputView of SlackTextViewController then Keyboard will be displayed.

  • But InputView is not following up keyboard. So I cant see InputView after keyboard showing up.

Here is snippet code.

class CommentVC: SLKTextViewController {


    override var tableView: UITableView {
        get {
            return super.tableView!
        }
    }


    override class func tableViewStyle(for decoder: NSCoder) -> UITableViewStyle {

        return .plain
    }

    override func viewDidLoad() {


        super.viewDidLoad()



        //Do any additional setup after loading the view, typically from a nib.
        let cellNib = UINib(nibName: "CommentTableCell", bundle: Bundle.main)
        tableView.register(cellNib, forCellReuseIdentifier: "CommentTableCell")

        //Set Title at the top


        self.navigationController?.isNavigationBarHidden = false
        self.navigationItem.title = "Comments"
        self.navigationItem.hidesBackButton = true

        let backButton = UIBarButtonItem(image: UIImage(named: "backBtn"), style: UIBarButtonItemStyle.plain, target: self, action: #selector(CommentVC.back(_:)))

        self.navigationItem.leftBarButtonItem = backButton
        self.navigationItem.leftBarButtonItem?.setBackgroundVerticalPositionAdjustment(-8, for: UIBarMetrics.default)



        // SLKTVC's configuration
        self.bounces = true
        self.shakeToClearEnabled = true
        self.isKeyboardPanningEnabled = true
        self.shouldScrollToBottomAfterKeyboardShows = false
        self.isInverted = false





    }

    override func didChangeKeyboardStatus(_ status: SLKKeyboardStatus) {
        switch status {
        case .willShow:
            print("Will Show")
        case .didShow:
            print("Did Show")
        case .willHide:
            print("Will Hide")
        case .didHide:
            print("Did Hide")
        }
    }

}

My problem is didKeyboardChangeStatus is not called.

It does not working in iOS 10 and iOS 11.

enter image description here

0

There are 0 answers