我有一个获取元素索引值的独特场景,其中结构是
数组 - 数组内 - 字典内
(
{
STS = OPEN;
"STS_ICON" = "LIGHT_GREY";
},
"Headerquarter Planning"
),
(
{
STS = INPR;
"STS_ICON" = "LIGHT_BLUE";
},
"In Process"
),
(
{
STS = COMP;
"STS_ICON" = "LIGHT_GREEN";
},
Released
),
(
{
STS = CANC;
"STS_ICON" = "LIGHT_RED";
},
"ON HOLD - Call Transfer Delay"
)
)
在这种情况下,假设我想要@“ON HOLD - Call Transfer Delay”字符串的索引。
我试过这样..
NSUInteger index;
if([listOfStatus containsObject: list.statusType])
{
index = [listOfStatus indexOfObject: list.statusType];
}
其中 list.statusType 是 @"ON HOLD - 呼叫转移延迟"。但在这里我得到“索引”一些奇怪的值 15744929。