這是我的數組包含的值:如何刪除特定的數組值而不是對象?
(
{
yes = 0;
},
{
yes = 1;
},
{
yes = 2;
},
{
yes = 3;
},
{
yes = 4;
}
)
現在我想是除去= 1;
這是我的代碼
-(void)touchup:(UIButton*)click
{
dicButtonState=[[NSMutableDictionary alloc]init];
if(click.selected==NO)
{
click.backgroundColor=[UIColor colorFromHexString:@"#ffc400"];
click.selected=YES;
[dicButtonState setValue:@(click.tag) forKey:@"yes"];
// [arrButtonState addObject:btntag];
[arrButtonState addObject:dicButtonState];
}
#pragma mark deleting product on user deselection
else
{
click.backgroundColor=[UIColor grayColor];
click.selected=NO;
}
}
這是我的代碼,維護用戶選擇按鈕的狀態我很存儲陣列的值。
我怎麼也刪除此,請人幫我做這個..
這是一個'NSDictionaries'數組嗎? – Fonix
@Fonix是..... –
你是如何創建這個數組的?請添加一些代碼 – ZeMoon