iPhone:在输入文本时无法弄清楚如何自动滚动具有自定义 UITextField 单元格的 UITableView
好吧,我知道这似乎是一个重复的问题,但我认为并非如此。我实际上已经实现了这个(感谢这个SO问题) ,但看起来很迟缓。我愿意稍微调整一下,但我遇到了 AboutObjects 的演示应用程序似乎具有完全正确的功能,并且完全没有代码执行它。我已经查看了他们的演示代码数十次,但我无法弄清楚他们在做什么而我没有。要查看的代码位于他们的 iPhone Development Tutorials 部分,称为“可编辑 TableView”(从底部数第二个)。该网站的论坛上有几个问题询问他们如何获得该功能,但没有答案(除了“这是一个内置功能”)。有谁知道为什么他们的 UITableView 默认实现输入滚动(包括在键盘弹出时能够手动滚动视图,而我无法工作)。
Ok, I know this seems like a duplicate question, but don't think it is. I actually have this implemented already (thanks to this SO question), but it seems sluggish. I am willing to tweak it a bit, but I ran across a demo app by AboutObjects that seems to have exactly the right functionality with absolutely no code doing it. I have looked through their demo code dozens of times, and I can't figure out what they are doing that I am not. The code to look at is in their iPhone Development Tutorials section, and is called "Editable TableView" (2nd from the bottom). There are a couple of questions on the forums on that site asking how they got the functionality, but there is no answer (other than "It's a built in function"). Does anyone have any clue as to why their UITableView would implement the input scrolling by default (including being able to scroll the view manually when the keyboard pops up, which I cannot get to work).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不确定我做错了什么,或者我改变了什么,但它现在“正常工作”。无需代码。诡异的。
Not sure what I was doing wrong, or what I changed, but it "just works" now. No code necessary. Weird.
我相信 UITableViewController 处理自动滚动,包括向上滚动,使键盘弹出时行可见。
I believe the UITableViewController handles the automatic scrolling including scrolling up making rows visible when the keyboard pops up.