My question is : i have a TableVC wherein i have CustomCells. These customCells have Various Label and one of them is Time label. The text of the timeLabel would be fetched by Parsing an xml. But as of now assuming that i used static content for e.g.: 2:45pm. Is it possible for me to give this text as fireDate of UILocalNotification and off-course it should fire on the said time. It should be done on click of cell that is in "didSelectRowAtIndexPath". Or this cannot be done ??
And yes if this is a repetition question,you did not like it, or if if there is some spelling mistake or anything related Please do not mark it with down votes. I have seen in the past where people play such cheap gimmicks and use their so called reputations in an unhealthy and unprofessional way.
Your related answer's are warmly welcomed.
Thank You !!!
EDIT i tried this thing
NSString *str = cell.timeLabel.text;
NSLog(@"str = %@",str);
formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"MM/dd/yyyy hh:mm a"];
NSTimeZone *gmt = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
[formatter setTimeZone:gmt];
date = [formatter dateFromString:str];
the above in cellForRowAtIndexPath
and
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate = [NSDate dateWithTimeInterval:5 sinceDate:date];
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"You are notified";
localNotif.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication]scheduleLocalNotification:localNotif];
}