如何在Xcode Interface Builder中设置UIRefreshControl的目标?

时间:2014-07-04 23:36:00

标签: ios swift

此代码:

refreshControl.addTarget(self, 
    action: Selector("refreshTable"), 
    forControlEvents: UIControlEvents.ValueChanged)

如何在Xcode 6的Interface Builder中以图形方式执行此操作?

1 个答案:

答案 0 :(得分:0)

您是否尝试过控件从控件拖动到视图控制器?首先设置处理程序

@IBAction func refreshTable {
   // refresh the table
}