Split the array varible
i have an array like this.
(
2right, 1, 3, 4
)
i want it to seprete out right. Like this
(
2, 1, 3, 4
)
i tried out this one but not working.
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];
give me warning. how may i seprate out the string.
No comments:
Post a Comment