8

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

ggould75
  • 880
  • 2
  • 14
  • 23
  • 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 May 16 '13 at 17:58
  • redlmar is right, check this SO thread http://stackoverflow.com/q/9236621/2315974 – danypata May 16 '13 at 19:38
  • 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 May 16 '13 at 19:50
  • ...What I mean is that I've tried to connect a Dynamic cell with a controller using a modal segue and it works – ggould75 May 16 '13 at 19:58

2 Answers2

11

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

Jim Holland
  • 1,180
  • 12
  • 19
1

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.

Xcoder
  • 1,433
  • 3
  • 17
  • 37
Martin
  • 846
  • 1
  • 9
  • 23
  • Is a universal application and I have 2 different storyboards (one targeted to iPad and one for iPhone). The screenshots I've attached are for iPad. – ggould75 May 16 '13 at 17:56