为什么我无法在情节提要中连接 IBOutlet?
我有一个 ViewController,它有几个为 UITextView 定义的 IBOutlet 属性。在故事板中,我已将视图控制器分配给自定义视图控制器。当我 cntr + 单击视图控制器时,我可以看到我的两个 IBOutlet。当我尝试将它们拖动到情节提要上的 UITextViews 时,它们不会突出显示并且无法分配。
我是 xcode 4 的新手。
以下是视图控制器中的属性定义:
@interface CreateUserViewController : UIViewController<UITextInputDelegate>
@property(nonatomic,retain) KeychainItemWrapper *keyChainWrapper;
@property(nonatomic,retain) IBOutlet UITextView *userNameTxt;
@property(nonatomic,retain) IBOutlet UITextView *passwordTxt;
这些属性是在实现中综合的。我可以毫无问题地将每个文本字段的委托分配给视图控制器。我错过了什么步骤吗?
谢谢
I have a ViewController that has a couple of IBOutlet properties defined for UITextView. In the storyboard I have assigned my viewcontroller to the custom view controller. When I cntr + click on the viewcontroller I can see my two IBOutlets. When I try to drag them to the UITextViews on the storyboard they will not highlight and cannot be assigned.
I'm new to xcode 4.
Here is the property definitions from the viewcontroller:
@interface CreateUserViewController : UIViewController<UITextInputDelegate>
@property(nonatomic,retain) KeychainItemWrapper *keyChainWrapper;
@property(nonatomic,retain) IBOutlet UITextView *userNameTxt;
@property(nonatomic,retain) IBOutlet UITextView *passwordTxt;
These properties are synthesized in the implementation. I can assign each of the textfields' delegate to the viewcontroller without a problem. Am I missing any step?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您尝试连接的视图确实是 UITextView,而不是 UITextField。将它们混淆并不困难。
Make sure that the views you're trying to connect really are UITextViews and not UITextFields. It's not difficult to get them mixed up.