首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ios 4.2中文本字段问题的占位符

ios 4.2中文本字段问题的占位符
EN

Stack Overflow用户
提问于 2010-12-27 14:19:32
回答 1查看 1.6K关注 0票数 0

我在表格自定义单元格中有一个UITextField。我将TextField文本对齐设置为UITextAlignmentCenter.我还添加了占位符文本到这个textField中,并制作了这个textField firstResponder .Now,在iOS3.0和4.0中发生了什么,它工作得很完美(光标在中心闪烁,输入的文本也在中心),但在iOS4.2.1中,光标在左边闪烁,而输入的文本总是居中aligned.If我删除了占位符文本,即使在iOS4.2.1中一切都运行得很好。

EN

回答 1

Stack Overflow用户

发布于 2010-12-27 17:49:00

我对这个问题的看法是:

代码语言:javascript
复制
   If you notice the cursor position in prior versions(iOS 4.0 and 4.1),   
you can notice that the cursor is not placed exactly at the center of the
placeholder text. But in 4.2 the cursor is placed neatly at the left side of 
the placeholder. 

看看下面的屏幕截图。

早期版本(iOS 4.0和4.1)中的光标位置:

iOS 4.2中的光标位置:

如果我们注意到光标位置在4.2中得到了改进,它看起来比旧版本更好。

代码语言:javascript
复制
I guess Apple has made this intentionally to make it better.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4536929

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档