I'm trying to drag connections from some UIButtons on my Storyboard to a subclass of UIButton
(called AGPiece
in my header file. I have two storyboards for iPhone and iPad.
I was able to drag the iPhone ones over and create new outlets (@property (strong, nonatomic) IBOutlet AGPiece *piece1;
, but now I'm coming to want to link the iPad storyboard to those same lines of code, I can't drag onto those lines, it doesn't get the highlight and let me, it only allows me to create a new one above or below that line. Obviously if I'd created the iPad ones first, it would've created those and not the phone, the issue is dragging to an existing line of code, as opposed to dragging out and creating a new one. It seems that Xcode expects a UIButton
, and doesn't know that my AGPiece
inherits from UIButton
.
Is there a way around this? It worked fine when I was linking to UIButton
instances and had UIButton
written in the header file, but now I'm coming to implement the custom class, it doesn't want anything to do with it.