我有一本字典:
" a) 2012 UN NEWNW" = (
"2012/06/04 Saudi Arabia Huge Sandstorm",
"2012/05/27 Niger Huge Sandstorm"
);
" b) 2012 DEUX " = (
"2011/03/30 Niger Huge Sandstorm"
);
" c) just for TROIS" = (
"2011/03/30 AHuge Sandstor
例如,我有一个数组,
Array {
3.0 at Index 0
2.0 at Index 1
3.5 at Index 2
1.0 at Index 4
}
我希望在不丢失索引的情况下按升序对其进行排序,如下所示:
Array {
1.0 at Index 4
2.0 at Index 1
3.0 at Index 0
3.5 at Index 2
}
当我使用这个对数组进行排序时,
NSArray *sortedArray = [hArray sortedArrayUsingSelector:@selecto
我正在尝试创建一个表视图来显示名为tableText<String, String>的字典的内容。但是在cellForRowAtInSection方法中,当我执行以下操作时
let obj = tableText[indexPath.row]
这让我说错了
cannot subscript a value of type 'Dictionary<String, String> with an index of Int.
我也尝试过
let obj = tableText[indexPath.row] as? NSDictionary
但错误仍然存在。
能帮我处