How to Make A button do more than one action xcode(如何使一个按钮执行多个操作 xcode)
本文介绍了如何使一个按钮执行多个操作 xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,所以在我的 Xcode 项目中,我有一个按钮,我需要两次执行相同的方法,但使用不同的图像请帮助
Ok So In My Xcode project I Have A button That I need to do the same method twice but with A Different Image Plz Help
代码:
推荐答案
这就是方法的用途.创建一个采用图像名称的方法:
This is what methods are for. Create a method that takes an image name:
现在让您的按钮处理程序调用两次:
Now have your button handler call this twice:
这篇关于如何使一个按钮执行多个操作 xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!