How do I convert NSMutableArray to NSArray?

前端 未结 9 815
清酒与你
清酒与你 2020-12-04 04:38

How do I convert NSMutableArray to NSArray in objective-c?

9条回答
  •  时光说笑
    2020-12-04 05:12

    i was search for the answer in swift 3 and this question was showed as first result in search and i get inspired the answer from it so here is the swift 3 code

    let array: [String] = nsMutableArrayObject.copy() as! [String]
    

提交回复
热议问题