private var selectedButtonArray = [UIButton]()
private var buttonStepperDictionaryArray = [NSMutableDictionary]()
func appendToButtonStepperDictionaryArray(ixSelectionItem: IxSelectionItem...){
for iSelectionItem in selectedButtonArray{
buttonStepperDictionaryArray.append("buttonDesc":iSelectionItem.button.text,"dsds":iSelectionItem.button.tag)
}
}
结果应如下所示:
[{"buttonDesc":"abc","buttonTag":1},
{"buttonDesc":"bcd","buttonTag":2},
{"buttonDesc":"ddd","buttonTag":3}]
我该怎么做?
答案 0 :(得分:0)
试试这个
private var selectedButtonArray = [UIButton]()
private var buttonStepperDictionaryArray = [NSMutableDictionary]()
func appendToButtonStepperDictionaryArray(ixSelectionItem: IxSelectionItem){
for iSelectionItem in selectedButtonArray{
buttonStepperDictionaryArray.append(["buttonDesc": ixSelectionItem.button.text,"dsds":iSelectionItem.tag])
}
}