UITextfields在iOS 6中返回null [英] UITextfields returning null in iOS 6

查看:75
本文介绍了UITextfields在iOS 6中返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚为iOS 6更新了我的开发系统,当我测试我构建的应用程序时,我现在只是从我的UITextfields获得(null)。

I just updated my dev system for iOS 6 and when I was testing a app I built I am now just getting (null) from my UITextfields.

这是我正在做的一个例子: NSString * email = usernameField.text;

Here is a example of what I am doing: NSString *email = usernameField.text;

输入该文本字段后返回我输入的内容我只得到(null)

After typing in that textfield and returning what I typed I only get (null)

我在iOS 6中缺少什么?

What am I missing with iOS 6 here?

推荐答案

想出来。我忘了为该视图合成文本字段。没有它之前它们工作正常,但iOS 6似乎更严格。

Figured it out. I forgot to synthesize the textfields for that view. They worked fine without it before but iOS 6 seems to be stricter with it.

这篇关于UITextfields在iOS 6中返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆