0
我想設置一個NSMutablearray,但總是得到空值,它不更新與迭代上的不同值。下面是代碼:NSMutableString不是追加,它全是空
NSMutableString *tipo = [NSMutableString stringWithString:@""];
if (self.canas.on){
[tipo stringByAppendingString: @"0"];
}
if (self.copas.on){
if ([tipo length]==0){
[tipo stringByAppendingString: @"1"];
}else{
[tipo stringByAppendingString:@",1"];
}
}
if (self.comer.on){
if ([tipo length]==0){
[tipo stringByAppendingString: @"2"];
}else{
[tipo stringByAppendingString:@",2"];
}
}
非常感謝
非常感謝!!!! – theomen