0
在像C或Java,其他语言,如果我要停止执行的方法和返回值我喜欢下面:如何停止在Swift中执行某个操作?
public void aFunction() {
if(a == b) {
// Do something...
return; // stop here
}
// Do something else
}
如果迅速,我指定动作的按钮
@IBAction func button_1(sender: AnyObject) {
if a == b
{
// Do something ...
/* I want to stop here but I don't know how */
}
// Do something else
}
如何停止在Action中执行脚本? 谢谢。