简体   繁体   English

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

[英]How do I set the target of a UIRefreshControl in Xcode Interface Builder?

This code: 这段代码:

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

How do I do this graphically in Xcode 6's Interface Builder? 如何在Xcode 6的Interface Builder中以图形方式进行此操作?

Have you tried control-dragging from the control to the view controller? 您是否尝试过将控件从控件拖动到视图控制器? First set up the handler 首先设置处理程序

@IBAction func refreshTable {
   // refresh the table
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM