参考这个: https://blog.csdn.net/qq_15509071/article/details/119169904 把inputAccessoryView 改成 inputView 即可