iphone - UITextField 的 iOS 5 和 iOS 6 行为在 KeyboardType Email 的情况下不同

标签 iphone ios ios5 ios6 uitextfield

我最近观察到您创建了 1 个 UITextField 并将其 UIKeyboardType 设置为 Email 并设置属性 setsecuretextentry

现在请注意 iOS 5 和 iOS 6 设备或模拟器中的这种行为...

请注意,在 iOS 5 中,正常(不带 @ 符号的字母表)键盘将打开。在 iOS 6 中,电子邮件类型键盘将打开。

有没有其他人早些时候观察到这种行为?是否已经向 Apple 报告了任何错误?谁能解释一下如何解决这个问题??

最佳答案

通过在代码中设置属性,我也设法在 iOS 5 中获得了 iOS 6 的行为。必须是从 nib 文件中选取属性的方式/顺序的错误:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.textField.secureTextEntry = YES;
    self.textField.keyboardType = UIKeyboardTypeEmailAddress;
}

关于iphone - UITextField 的 iOS 5 和 iOS 6 行为在 KeyboardType Email 的情况下不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14126919/

相关文章:

ios - 有没有比 'scheduledTimerWithTimeInterval' 更好的方法来制作游戏循环

objective-c - 更改 iAd 位置和展示位置

ios5 - MPMoviePlayerController 覆盖控件在重用后不响应触摸

iphone - 如何符合 UITabBarControllerDelegate

iphone - UINavigationbar提示与屏幕内容重叠

ios - UITableViewCell 中的 UILabel 返回 nil

iphone - UITabBarController.selectedIndex 不改变tabBar图标?

iphone - 加载应用程序时激活 iPhone 锁屏

iphone - NSDateFormatter 时区中带有冒号的日期/时间的日期格式

iphone - 将 Cinema 4D 模型和纹理放入 iPhone 应用程序中