I am new in iOS.
I want to use Today extension. I have created Today extension and add uitableview it works fine. but when I try to select row then delegate Method DidSelectRowAtIndexPath doesn't call.
In my code there are 3 methods of uitableview delegate and datasources.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"];
}
cell.textLabel.text = [NSString stringWithFormat:@"Hello World%li",(long)indexPath.row];
return cell;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
Above Datasources Method call correctly
but didselect row method doesn't call after selection of row.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"row Selected");
}
appreciate for help.