触摸时聚焦并放大 UITextField?
到底如何才能让 iPhone 视图放大聚焦的 UITextField 呢?我需要点击我想要编辑的文本字段,我的视图应该放大到点击的文本字段并拉起键盘(它已经这样做了),类似于许多互联网文本字段在 iPhone 上获得焦点。这是某种类型的叠加吗?
我一直在到处寻找这个解决方案,但也许我只是用错了术语。先感谢您。
How in the world does one get the iPhone view to zoom in on a focused UITextField? I need to tap on a text field that I want to edit, and my view should zoom in to the tapped text field and pull up the keyboard (which it already does), similar to how many Internet text fields gain focus on the iPhone. Is this some type of overlay?
I've been looking everywhere for this solution but maybe I've just got the wrong terminology. Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能与此StackOverflow问题。
本质上,有多种方法,但您必须手动编程此效果。文本字段已经是一个覆盖层。您可以移动它,或滚动包含的视图。
Could be a duplicate of this StackOverflow question.
In essence, there are a number of ways, but you have to program this effect manually. A textfield is already an overlay. You can either move it, or scroll the containing view.
请按照以下步骤操作。
为所有文本字段实现委托方法。在界面生成器中连接文本字段的出口基本上是设置委托属性。然后在委托属性中,您可以定义您想要实现或想要执行的功能的方法。
谢谢
Please follow the following steps.
Implement the delegate method for all textfield.connect the outlet of textfield in interface builder basically it's setting the delegate property.then in delegate property you can defined the method whatever you want to implement or wanted to do functionality.
Thanks