我想在UITableViewCells中使用字典中的值.我可以通过使用indexPath.row获取值并使用indexPath.section获取字典中的密钥吗?
我想构建一些将保留以便快速搜索的数组.如果我使用这样的东西:
let dictionary: [Int:Int] = [:]
for i in 0 ..< 10000000 {
dictionary[i] = 0
}
Run Code Online (Sandbox Code Playgroud)
请问查询:
dictionary[n] == nil
Run Code Online (Sandbox Code Playgroud)
在对数时间内执行?
如果是,对其他类型是否相同:Float,Double,String.
最后,我需要它使用UUID类型,它会工作吗?