void函数中的意外非void返回值(swift3)

时间:2017-11-28 20:28:11

标签: swift

func joystick1() -> (xCoordinate:String, yCoordinate:String) {
    let outside1 = Circle(radius: 8)
    outside1.borderColor = #colorLiteral(red: 0.0352941192686558, green: 0.117647059261799, blue: 0.164705887436867, alpha: 1.0)
    outside1.color = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
    let inside1 = Circle(radius: 2)
    inside1.draggable = true
    //-25, -40
    inside1.center.x = -40
    inside1.center.y = -25
    outside1.center.x = -40
    outside1.center.y = -25
    inside1.onTouchUp {
        return (inside1.center.x, inside1.center.y)
        inside1.center.x = -40
        inside1.center.y = -25

    }
    inside1.onTouchDrag {
    }
}

此代码给出了错误:

  

“void函数中出现意外的非void返回值”

0 个答案:

没有答案