草庐IT

checkEmail

全部标签

xcode - 如何从 Swift 中的函数返回 boolean 值

我环顾四周,但很惊讶我找不到任何可以解释这一点的东西。如果我有:funccheckEmail(){vartest=truereturntest}...elsewhereinthecode....varemailStatus=checkEmail()如何让这个函数返回boolean值true? 最佳答案 funccheckEmail()->Bool{vartest=truereturntest}在代码的其他地方....varemailStatus=checkEmail() 关于xcode-

xcode - 如何从 Swift 中的函数返回 boolean 值

我环顾四周,但很惊讶我找不到任何可以解释这一点的东西。如果我有:funccheckEmail(){vartest=truereturntest}...elsewhereinthecode....varemailStatus=checkEmail()如何让这个函数返回boolean值true? 最佳答案 funccheckEmail()->Bool{vartest=truereturntest}在代码的其他地方....varemailStatus=checkEmail() 关于xcode-