2016-08-26 6 views
-2

NSDictionaryスイフトに変異させる必要があります。NSDictionaryの要素を迅速辞書にコピーするにはどうすればいいですか?

したがって、NSDictionaryの要素をswiftDictionaryにコピーする必要があります。

[[NSMutableDictionary alloc] initWithDictionary:(nonnull NSDictionary *)]; 
+0

NSDictionaryとNSMutableDictionaryの使用をやめ、let(定数)またはvar(変更可能)でSwift辞書を使用するだけです。 – Moritz

答えて

2

のObjective-C等価等

何かA辞書は値型であり、迅速にstructあります。

let firstDictionary = .... 
let copyOfirstDictionary = firstDictionary// This will copy the contents from first dictionary to another. 
関連する問題