Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile error trying to perform popover segue from a dynamic UITableViewCell

I'm trying to connect a dynamic UITableViewCell to a navigation controller in a storyboard using a popover segue.
To do that I ctrl-dragged from the cell to the navigation controller, selected "popover" as segue and then assigned an identifier to it. In this way the anchor point of the segue becomes the cell.

With this configuration I get this error from the compiler:

Couldn't compile connection: <IBCocoaTouchOutletConnection:0x40114c920  <IBProxyObject: 0x40114c540> => anchorView => <IBUITableViewCell: 0x4012576c0>>

What I want to do is simply to open a popover controller every time a cell is selected. There's no error if I try to do the same but specifying another kind of segue (push or modal...). I have already tried to create a new sample project from scratch with only the required components but the error persists.

Thanks for reading.

enter image description here

enter image description here

like image 674
ggould75 Avatar asked May 16 '13 17:05

ggould75


2 Answers

The simple solution is to change the popover anchor point to something else 'static' in your view. In my case, a UIBarButtonItem that is the anchor for the 'add' action'.

This is done by dragging from the circle to the right of Anchor box to the item on the storyboard you wish to use as the anchor.

enter image description here

like image 143
Jim Holland Avatar answered Nov 05 '22 15:11

Jim Holland


Looking at your UI, it looks like you are creating an application for iPhone, and the popover segue is available for iPad only. That could be the reason.

like image 45
Martin Avatar answered Nov 05 '22 15:11

Martin