- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
ARSPopover *popoverController = [ARSPopover new];
popoverController.sourceView = [tableView cellForRowAtIndexPath:indexPath];
popoverController.sourceRect = [tableView rectForSection:indexPath.section];
popoverController.contentSize = CGSizeMake(200, 100);
popoverController.arrowDirection = UIPopoverArrowDirectionAny;
[self presentViewController:popoverController animated:YES completion:^{
[popoverController insertContentIntoPopover:^(ARSPopover *popover, CGSize popoverPresentedSize, CGFloat popoverArrowHeight) {
CGFloat originX = 0;
CGFloat originY = 0;
CGFloat width = popoverPresentedSize.width;
CGFloat height = popoverPresentedSize.height - popoverArrowHeight;
CounterView *view = [CounterView new];
[popover.view addSubview:view];
}];
}];
return;
}
