如何回忆Multidimensional NSMutableArray中的对象?
var userVideoNames2: NSMutableArray = [[]]
userVideoNames2 = [
["aaa-0", "bob-0", "ccc-0", "ddd-0"],
["aaa-1", "bob-1", "ccc-1", "ddd-1"],
["aaa-2", "bob-2", "ccc-2", "ddd-2"],
["aaa-3", "bob-3", "ccc-3", "ddd-3"],
["aaa-4", "bob-4", "ccc-4", "ddd-4"]
]
print(userVideoNames2[3][0]) // aaa-3 ???
print(userVideoNames2[1][2]) // ccc-1 ???
答案 0 :(得分:1)
不要使用NSMutableArray。 Swift数组是可变的。将POST http://Server.com/MyService/Account/Register HTTP/1.1
Host: server.com
Connection: keep-alive
Content-Length: 463
Accept: */*
Origin: http://server.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://server.com/MyService/Account/Register/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: .ASPXAUTH=7A14FC68B72078BAE43A623B94A901180C72093CCE222BBD98EE2AE7E2612078D1E3B7D8860905A4F7B2D75FD67E9274A0A5C40760A5AF703F970504380EBAF8B3D09A15F0B70090ACF4882DC58885F7CF12473BF55647840F3080ADD2C19249
Name=Lorem&Email=abc@abc.com&interest=%5B%221%22%5D§ors=%5B%221%22%2C%222%22%5D&subscribe=false
声明为POST http://server.com/MyService/Account/Register HTTP/1.1
Content-Type: application/json
Host:server.com
Cookie: .ASPXAUTH=F586C63F64186E13EB6EC19AAB25A531A0EDA5B7B601013550ADD629C1481EC3F080DDB5F06D691CB8F81EE8631EF8859F82CF7DD3F2ED2A597AA971A53E80141EDD6EA549784AD7EAE8E144F0CD3196A44316F29C08E0C5383A7231A1B6C5EF
Content-Length: 536
Expect: 100-continue
{"Name":"Lorem","Email":"abc@abc.com","sectors":["1","2"],"interest":["1"],"subscribe":false}
,一切顺利。
userVideoNames2