0
votes

First of all, sorry: I'm pretty sure there's something incredibly stupid I'm doing here, and that I should absolutely go to sleep right now.

The problem is that I added an UIBarButtonItem to a nib and wired it to the right outlet, but after my view has been loaded, the ivar I connected is still nil. Is this supposed to work at all, or it only works when you drag the bar button inside a navigation bar in Interface Builder?

1
By the way, I considered the idea of creating the button in code, but I really want to know why this isn't working with IB.ySgPjx

1 Answers

0
votes

The problem was that the UIBarButtonItem was inside an UIViewController instantiated by a UITabBarController, but I had forgotten to set the "Nib Name" field in the view controller's Attributes.