I am using this code for view did load..
- (void)viewDidLoad {
myPicker.hidden=TRUE;
NSArray * shopping=[NSArray arrayWithObjects:@"Lie in bed",
@"Shower",
@"Brush Teeth",
@"Eat",
@"Make Lunch",
@"Dressed",
@"Make up",
@"Hair",
@"Prepare Childern",
@"Other",nil];
for(int i=0;i<61;i++)
{
if (array_time ==nil) {
array_time=[[NSMutableArray alloc] init];
}
NSString *str=[NSString stringWithFormat:@"%i Min",i];
[array_time addObject:[NSString stringWithFormat:@"%@",str]];
[str release];
}
for (int i=0; i<61; i++) {
NSLog(@"%@",[array_time objectAtIndex:i]);
}
if(array_from==nil)
{
array_from=[[NSMutableArray alloc] init];
}
[array_from addObject:shopping];
[super viewDidLoad];
}
after that i have coded for table view. I have checked by applying break point all over but i was terminate after view did load. On console it is not giving any error.
So what is mistake in this code or any where?
Thanks in advance..
you don’t really need to release this string:
str
you didn’t allocate it