I have a question regarding a Dictionary of Dictionaries. Is there a shorter way to put single elements in the Dict than I did?
var cellHeight = [ Int : [ Int : CGFloat ] ]()
// ...
if let _ = cellHeight[0] {
cellHeight[0]![2] = 0.0
} else {
cellHeight[0] = [ 2 : 0.0 ]
}
In all the tutorials I checked it’s only explained how to fill/initialize the full dict-of-dict and than read from it, but not how to fill it part by part.