Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在控制器中有一个滚动视图和一个搜索栏。当滚动视图被拖动时,我希望键盘与滚动视图一起移动。就像在 iphone 上编辑消息一样。
那么我该怎么做,如果你能给我一些代码,我将不胜感激。
我的意思是当搜索栏是第一响应者时,会有一个键盘哈?
如果我滚动滚动视图,键盘将随之移动。
有人说我应该听一些通知。这样对吗?
非常感谢。
您不能将键盘与视图一起移动。您只能更改其下方视图的位置。因此,如果您希望将键盘与滚动一起移动....您需要做的就是制作自己的自定义键盘!!!!!!