How to Create 2D array in Swift?

前端 未结 3 1822
轻奢々
轻奢々 2021-01-16 06:43

Hi there I am new to Swift, I am trying to save Longitude and Latitude and place name from map\'s coordinate object to an Multidimensional array i.e:

Can anyone plea

3条回答
  •  滥情空心
    2021-01-16 07:05

    Without more information, this is what I can offer.

    var pinArray = [[AnyObject]]()
    
    for location in mapLocations {
        var innerArray = [location["latitude"], location["longitude"], location["place"]]
        pinArray.append(innerArray)
    }
    

提交回复
热议问题