I have a UIBarButtonItem embedded in a navigation item. It is positioned using the storyboard and at some point during runtime, it disappears. I have discovered that it is being deallocated.
I could start browsing through my code, maybe doing a search for 'myButton = nil', to see if something is deliberately nilling it, for example. Then I decided to find out if there was an advanced debugging technique I could use for situations like this.
One approach I could use is to subclass UIBarButtonItem and put a breakpoint in dealloc, to see if a stack trace would provide anything useful about who is nilling my button.
Does anyone know of any cool LLDB features, or key value observing technique or some symbolic breakpoint I could set for this kind of thing?
The App does not crash, the button just disappears at a predictable point at runtime.
P.S. it is probably something simple, I am just asking to find out what debugging techniques y'all might be using for things like this.