Remove item that is inside of an array which is the value in a dictionary Swift 2

后端 未结 3 406
余生分开走
余生分开走 2021-01-25 01:38

I know this might have been answered before, but I couldn\'t find anything when i searched.

So i have a dictionary that looks like this:

var dict = [Stri         


        
3条回答
  •  时光取名叫无心
    2021-01-25 02:02

    guard var furniture = dict["Furniture"] else {
        //oh shit, there was no "Furniture" key
    }
    furniture.removeAtIndex(1)
    dict["Furniture"] = furniture
    

提交回复
热议问题