Debug delete button

I have a UIBarButtonItem built into a navigation item. It is positioned using a storyboard and disappears at some point during operation. I found that he was being freed.

I could start looking at my code, perhaps by doing a search for "myButton = nil" to find out if this is intentionally guessing something. Then I decided to find out if there is a best debugging technique that I could use for such situations.

One approach that I could use is to subclass UIBarButtonItem and set a breakpoint in dealloc to see if the stack trace will be useful to the one who clicks my button.

Does anyone know of any great LLDB features or a method for observing key characters or any symbolic breakpoint that I could set for this kind of thing?

The application does not crash, the button simply disappears at a predictable point at runtime.

PS this is probably something simple, I just ask you to find out what debugging methods can be used for such things.

+4
source share
1 answer

I think the button is not released. The hierarchy of representations changes in such a way that it becomes invisible. To check this, click on the area and see if the corresponding function is activated or not.

, , . , . , , .

-, Xcode. , "" . , .

0

Source: https://habr.com/ru/post/1589170/


All Articles