我想在我的应用中添加可折叠菜单,因此我想将值添加到NSMutableDictionary。
任何人都可以帮我在NSMutableDictionary中添加值吗?下面是一个示例字典。
{
Items =
(
{
Name = "Item 0";
level = 0;
},
{
Name = "Item 1";
SubItems =
(
{
Name = "SubItem 0";
level = 1;
},
{
Name = "SubItem 1";
level = 1;
}
);
level = 0;
},
{
Name = "Item 2";
SubItems =
(
{
Name = "SubItem 1";
level = 1;
},
{
Name = "SubItem 2";
level = 1;
}
);
level = 0;
},
{
Name = "Item 3";
level = 0;
},
{
Name = "Item 4";
level = 0;
},
{
Name = "Item 5";
level = 0;
},
{
Name = "Item 6";
level = 0;
},
{
Name = "Item 7";
level = 0;
},
{
Name = "Item 8";
level = 0;
}
);
}