如何删除插座的所有参考 [英] how to remove all references for outlet

查看:182
本文介绍了如何删除插座的所有参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意外地将命令按钮的事件设置为outlet而不是action。由于自动拖动功能,xcode在applicationDelegate以及.h和.m文件中生成引用。我从.h和.m文件中删除了条目,但模拟器不会运行,因为它仍在寻找缺少的引用。我找不到任何地方的出口。我是iOS编程的新手。有人可以为此建议解决方案吗?

I accidently set event for command button as "outlet" than "action". Due to auto-drag feature, xcode generated references in applicationDelegate and .h and .m files. I removed the entry from .h and .m files but simulator wont run because it is still looking for that missing reference. I could not find that outlet referred anywhere. I am fairly new to iOS programming. Can anyone suggest a solution for this?

推荐答案

您必须取消连接出口与界面构建器中项目的链接。选择您将插座链接到的UI元素,然后在Connections Inspector中将其删除。

You have to unlink the outlet from the item in interface builder. Select the UI element that you linked the outlet to and then remove it in the "Connections Inspector".

点击小x^^^

这篇关于如何删除插座的所有参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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