https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

Fail

09/11/2019, 2:55 PM
Hi all! How I can use LinkedHashMap from IOS?
r

ribesg

09/11/2019, 2:57 PM
What do you mean?
f

Fail

09/11/2019, 3:09 PM
It shown like KotlinMutableDictionary
s

svyatoslav.scherbina

09/11/2019, 3:36 PM
What exactly are you trying to achieve?
f

Fail

09/12/2019, 8:04 AM
I want native swift arrays. for example I have "corp" LinkedHashMap in kotlin:
Copy code
LinkedHashMap<String, ArrayList<String>>
in IOS I see
Copy code
var corp: KotlinMutableDictionary<NSString, NSMutableArray> { get set }
Now I downcasted it to block.corp as? [String: [String]] Is this correct?
r

ribesg

09/12/2019, 8:06 AM
I’m not sure if that’s supposed to work this way
f

Fail

09/12/2019, 8:06 AM
Edited
s

svyatoslav.scherbina

09/12/2019, 11:40 AM
LinkedHashMap
and
ArrayList
are mutable, Swift collections aren’t. Why not just use
Map<String, List<String>>
instead?
53 Views