【发布时间】:2017-06-22 07:33:05
【问题描述】:
我对返回数组中的值有疑问,
var data = [[Int](),[Int]()]
如何在函数中返回数据?
func test() ->[[Int](),[Int]()] // this giving me error {
}
如何在 Swift 中返回单个数组中的多个数组?
【问题讨论】:
-
有趣的测试()-> [[Int]] { }
-
返回一个touple怎么样?
func test() -> ([Int], [Int]){}
标签: arrays swift function swift3