how to place the arrow of UIPopoverController, over UITableView's selected cell
+1
A:
I believe the arrow is placed automatically by the popover view itself. So whatever you set the frame of the popover to be, it'll draw its arrow top and center.
Jasarien
2010-04-07 10:13:17
+5
A:
You get to define the CGRect to which you want the popover to point.
CGPoint point = ...; // where they tapped on screen, taken from UIEvent, if you like
CGSize size = ...; // give a size range, maybe the size of your table cell
[popover presentPopoverFromRect:CGRectMake(point.x, point.y, size.width, size.height)
inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
BigSprocket
2010-04-07 14:15:46
+1
A:
Try getting the CGRect for the selected row using the following method.
CGRect selectedRect = [self.tableView rectForRowAtIndexPath:indexPath];
Then use the rect when you present the UIPopoverController:
[myPopover presentPopoverFromRect:selectedRect .............inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
Romeo
2010-05-01 05:04:51