iPhone:在输入文本时无法弄清楚如何自动滚动具有自定义 UITextField 单元格的 UITableView

发布于 2024-08-30 09:26:57 字数 697 浏览 4 评论 0原文

好吧,我知道这似乎是一个重复的问题,但我认为并非如此。我实际上已经实现了这个(感谢这个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

少女净妖师 2024-09-06 09:26:57

不确定我做错了什么,或者我改变了什么,但它现在“正常工作”。无需代码。诡异的。

Not sure what I was doing wrong, or what I changed, but it "just works" now. No code necessary. Weird.

懒猫 2024-09-06 09:26:57

我相信 UITableViewController 处理自动滚动,包括向上滚动,使键盘弹出时行可见。

I believe the UITableViewController handles the automatic scrolling including scrolling up making rows visible when the keyboard pops up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文