ios - How do I cast an NSDictionary to a swift dictionary if the NSDictionary has integers for keys -


i have dictionary stored in plist has imbedded dictionary in it. if use strings keys can use code below cast swift dictionary:

let namesdict = nsdictionary(contentsoffile: path!) var names = namesdict [string: [string : string]] 

however if try use integers keys in root dictionary can't work. code below doesn't work , returns error: "value type not bridged objective-c"

let namesdict = nsdictionary(contentsoffile: path!) var names = namesdict [int: [string : string]] 

i have tried intvalue, doesn't work either. missing?

from apple's nsdictionary reference:

in general, key can object (provided conforms nscopying protocol—see below), note when using key-value coding key must string (see key-value coding fundamentals).

plist key-value coding compliant


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -