ARSPopover icon indicating copy to clipboard operation
ARSPopover copied to clipboard

Wrong presentation in tableView

Open NikKovIos opened this issue 8 years ago • 0 comments

- (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;
    }

2017-03-11 13 52 51

NikKovIos avatar Mar 11 '17 10:03 NikKovIos