问题标签 [iboutletcollection]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - UITextView 的 IBOutletCollection
有人可以告诉我在 InterfaceBuilder 中将一组 UITextView 对象连接到 IBOutletCollection 的步骤是什么?在我的 XIB 文件(比如 myfile.xib)中,我有一排 8 个 UITextView 对象。在我的 myfile.h 文件中,我声明了一个 IBOutletCollection:
现在我想将 XIB UITextView 对象连接到 IBOutletCollection。我尝试从 XIB 中的第一个 UITextView CTRL 拖动到 FileOwner,但这并没有显示任何 IBOutlets。我试图在 FileOwner 上按 CTRL 单击(右键单击),然后弹出了一些黑色的小菜单。这显示了我的 textViews 插座集合,所以我尝试从 textViews 的小圆圈拖动到 XIB 中的 UITextView 对象,但这没有做任何事情。我在谷歌上搜索了一些关于此的信息,但我只找到了诸如“以通常的方式将你的 UITextView 连接到 IBOutletCollection”之类的语句。我不知道“通常的方式”是什么。请帮忙。
swift - Swift - IBOutletCollection 等价物
我正在尝试从 Swift 的 iTunesU 中的“为 iphone 和 ipad 开发 ios7 应用程序”中复制斯坦福 Matchismo 游戏。
在第 3 课幻灯片的第 77 页上,它显示了使用IBOutletCollection
Swift 上不可用的选项。Swift 文档示例显示了一个示例,该示例具有 数组IBOutlet
,但我无法弄清楚如何使 Interface Builder 将多个出口连接到同一个IBOutlet
/IBOutlet
数组。
有没有人想出如何做到这一点?
我知道我可以创建 12 个插座并以这种方式处理它,但我想让这项工作尽可能接近讲座幻灯片中的示例。
objective-c - 将 IBoutletcollection 的内容添加到数组中?
我有两个称为数字和符号的 IBoutlet 集合。我想将它们标题的内容添加到一个数组中,这样数组的第一个元素来自数字,第二个来自符号,第三个来自数字,第四个来自符号等等。有没有办法做到这一点?
编辑:
这是设置出口集合编号标题的代码。
ios - iOS,当点击两个按钮时,停止在插座集合中点击第二个按钮?
我有这个奇怪的错误,我不希望用户这样做,但由于它是一个儿童应用程序,因此我需要我的应用程序表现良好并且不会做一些意想不到的事情。它确实如此。
我有几个按钮和一个 IBAction 的插座集合。
有人可以用两根手指同时点击两个按钮。
我已经尝试过了,但是它仍然适用于两者。谁能建议我如何解决这个问题?
ios - Swift 将多个 IBOutlets 放在一个数组中
我使用这些(标有红色边框)IBOutletsctrl + drag
但我不喜欢 9 次完全相同的线(干)
我如何将这些 IBOutlets 放入一个数组中?
ios - Outlet collections, i want to access the properties(hidden) for my UIimageview
I can only access the id of my outlet collection and an id does not have a hidden property
This is my outlet collection
and this is when I try to call it, and change it to hidden.
I can not because objectAtIndex only returns an id
Thanks for any help
objective-c - IBOutletCollection 未显示在 Xcode 6 的界面生成器中
在我的 appdelegate.h 中,我有一个非常不起眼的 IBOutletCollection 的 NSViews,如下所示:
但是,每当我转到我的 mainmenu.xib 时,在 App Delegate 对象的连接上都找不到 Outlet Collections 子列表。将视图拖动到应用程序委托也不会打开插座,即使编辑器内行号旁边的插座圆圈在该行可见。
还有其他人遇到这个问题吗?这是带有objective-c的beta 5。
ios - 无法创建新的 IBOutlet 连接;Ctrl+拖动不起作用
这个解决方案“ Can't Ctrl drag views to header file ”对我不起作用,因为即使助手处于自动模式,我也看不到我的文件。
我正在尝试创建一个新的 IBOutlet 连接,但这不起作用。我在屏幕左侧打开 xib 文件,然后从助手编辑器手动打开 .m 文件。我手动选择它,因为它没有显示在自动选择中。每次我尝试将它连接到我的 .m 文件时,它都不会发生。
objective-c - 如何将手势识别器分配给集合?
我的目标是简单地将正确的发送button.titleLabel.text
到我的视图控制器的 handleLongPress 函数。这是我的功能:
这是我的故事板,我创建了一个引用出口集合的按钮“H”、“Cl”、“C”等。
每个按钮都会响应UILongPressGesture
,但记录的消息NSLog(@"!!!!! %@", self.myButton.titleLabel.text);
始终引用相同的 UIButton“C”,即使我按住不同的按钮也是如此。我做错了什么?如何让每个按钮将其标题发送到 handleLongPress 函数?
objective-c - Modify colors of buttons connected to a IBoutletCollection not working
I have this code should modify the colors of 24 buttons, connected to a IBoutletCollection :
In .h File:
In .m File:
The IBOutletCollection's connected to the existing 24 buttons in my view, which is initially in gray color, when I run this function to modify the colors of the buttons they all go to the white color, how can I solve this?