8
votes

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

2
I don't think this is possible. I've run into this problem too, and it seems you're not allowed to anchor a popover to a dynamic cell.rdelmar
redlmar is right, check this SO thread stackoverflow.com/q/9236621/2315974danypata
Thank you for point me to this thread. What I don't understand quite well is why it is allowed to create the same kind of connection using any other kind of segue (modal or push for example) but it's not allowed with a popover segue... What should be the difference? Sorry if the question seems odd but I'm new to storyboard.ggould75
...What I mean is that I've tried to connect a Dynamic cell with a controller using a modal segue and it worksggould75

2 Answers

11
votes

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

1
votes

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.