本文介绍了可以将多个按钮附加到单个 IBAction 是 Xcode 8 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将多个按钮连接到 Xcode 8 中的单个 IBAction,但它不起作用.我尝试了此处概述的做法
I have tried to connect several buttons to a single IBAction in Xcode 8 however it does not work. I tried the practices outlined here Xcode8 cannot connect multiple/single uibuttons to single @IBAction in swift file still to no avail. can anyone shed some light as to why or if it is simply still just a bug?
解决方案
Works fine for me in Xcode 8.1 on a new Swift 3 project. You have to control-drag from the button to the center side of the method to select it if it already exists rather than drag to the left side.
这篇关于可以将多个按钮附加到单个 IBAction 是 Xcode 8 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!