UITableViewCell accessoryView frame width/height zero
cocoa-touch, frame, ios, objective-c, uitableview
Solution
it's because `cell.accessoryView` is null. `cell.accessoryView` only returns custom `accessoryView`.
Problem
I am trying to show a `UIPopoverController` from a `UITableViewCell` accessoryView when the accessory is tapped. I use: ``` [self.popover presentPopoverFromRect:[[tableView cellForRowAtIndexPath:indexPath] accessoryView].frame inView:tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; ``` But the problem: ...`accessoryView].frame` is `{{0, 0}, {0, 0}}`, so the popover shows at the top left of the screen. Why does this happen? How do I get the actual frame of the accessoryView? I am using: - iOS 8 - Storyboards - The predefined Detail Accessory (`UITableViewCellAccessoryDetailButton`) - An iPad Please let me know if you need any more code to answer, and I will try to get it for you. Thanks in advance!