Swift init Array with capacity

后端 未结 5 1106
执念已碎
执念已碎 2021-02-02 06:55

How do I initialize an Array in swift with a specific capacity?

I\'ve tried:

var grid = Array  ()
grid.reserveCapacity(16)
<
5条回答
提交回复
热议问题