【发布时间】:2015-11-24 11:29:22
【问题描述】:
在java中,我们可以像这样创建对象的arraylist:
ArrayList<Country> countryList = new ArrayList<Country>();
Country aBucket = new Country();
aBucket.setName("Canada");
aBucket.setCity("Ottawa");
countryList.add(aBucket);
或者像这样:
ArrayList<Matrices> list = new ArrayList<Matrices>();
list.add( new Matrices(1,1,10) );
list.add( new Matrices(1,2,20) );
但是我怎样才能在 SWIFT 中获得相同的东西/替代方法
【问题讨论】: