【发布时间】:2014-11-25 10:43:37
【问题描述】:
我有一个包含按钮的集合视图。一旦按下按钮,我想隐藏它。如何在按钮的功能中访问该按钮的属性?
谢谢
cell.addButton.addTarget(self, action: "addToArray:", forControlEvents: UIControlEvents.TouchUpInside)
//这是函数
func addToArray(sender:AnyObject) {
println("Add to array")
}
【问题讨论】:
-
发送者是按钮。
标签: arrays xcode function swift uicollectionview