Swift return type clarification

后端 未结 4 1845
既然无缘
既然无缘 2021-01-29 13:05

I see a Swift function written as follows:

func calculation(imageRef: CGImage) -> (red: [UInt], green: [UInt], blue: [UInt]) {

 ...
 ...
}

4条回答
  •  -上瘾入骨i
    2021-01-29 13:42

    This method return a tuple

    func calculation(imageRef: CGImage) -> (red: [UInt], green: [UInt], blue: [UInt]) {
    
    
        return ([],[],[])
    }
    

提交回复
热议问题