Objective c 如何在目录中写入属性数组

Objective c 如何在目录中写入属性数组,objective-c,Objective C,我需要在数组里面输入一个属性值怎么办 我已经尝试将数组添加到dictor中 NSDictionary *uilabeldropdown = @{ @"UILabelDropDownWithTextField" : @{ @"headingLabel" : @{

我需要在数组里面输入一个属性值怎么办

我已经尝试将数组添加到dictor中

NSDictionary *uilabeldropdown = @{ 
    @"UILabelDropDownWithTextField" : @{                                              
        @"headingLabel" : @{                                                      
            @"localizationKey" : @"Number"                                                      
        },
        @"userTextField" : @{                                                     
            @"xpath" : @"Home"                                                      
        },
        @"contentArray" : @[                                                     
            @"item 0":@"Home",                                                      
            @"item 1":@"New",                                                      
            @"item 2":@"ground"                                                      
        ]
    }
};

@[…]
是不支持字符串键的
NSArray
的语法

@"contentArray" : @[                                                     
    @"item 0":@"Home",                                                      
    @"item 1":@"New",                                                      
    @"item 2":@"ground"                                                      
]
删除键并按索引访问值

@"contentArray" : @[
    @"Home",
    @"New",
    @"ground"
]

uilabeldropdown[@"contentArray"][0]

你能详细说明这个问题吗?你有不可变的对象。你能展示一下预期的结果吗?你试过什么?出现什么错误?
@“item 0”:@“Home”
看起来像字典,必须介于
@{}
之间。