私はこのような配列を持っています。
(
2右、1、3、4
)
ちゃんと分けてほしい。このような
(
2、1、3、4
)
私はこれを試しましたが、うまくいきませんでした。
NSMutableArray * array=[self.AnswerDic objectForKey:@"first"];
NSLog(@"%@",array);
optionA.text=[[[array objectAtIndex:0]componentsSeparatedByString:@"right"]objectAtIndex:0];
optionB.text=[[[array objectAtIndex:1]componentsSeparatedByString:@"right"]objectAtIndex:1];
optionC.text=[[[array objectAtIndex:2]componentsSeparatedByString:@"right"]objectAtIndex:2];
optionD.text=[[[array objectAtIndex:3]componentsSeparatedByString:@"right"]objectAtIndex:3];
警告してください。文字列を分離するにはどうすればよいですか?