i am getting program received signal “sigabrt” on main.m
- (IBAction)segmentControl:(id)sender {
NSTimeInterval oneUnit=(60*60*24*3);
//NSTimeInterval oneUnit1=(60*60*24*60);
switch (self.ydm.selectedSegmentIndex) {
case 0:
for (i=0; i<([forex count]); i++) { //It does not go next step
NSTimeInterval x=oneUnit*i/2;
i++;
id y=[NSNumber numberWithFloat:[[forex objectAtIndex:i] floatValue]];
[contentArray addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:[NSDecimalNumber numberWithFloat:x],@"x",y,@"y", nil]];
self.dataForPlot=contentArray;
}
break;
default:
break;
}
Can any one help me ?
I guess the problem is because of forex. It seems it is autoreleased. Make sure it is available at the time you access it. You should retain it while you create it.
Edit after the comments on the question:
Just change the line,
to be like this,