0

Initializing UIButton makes it to stop in super.init line testing with zombies. Clicking continue button runs without problem. Why ? How can I see the reason to stop there ?

required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)   ----> (Thread 1: breakpoint 1.2)
    setUnselectedProperties()
}
Fischer
  • 1,513
  • 4
  • 17
  • 38

1 Answers1

1

Do you have the option that all exceptions cause a breakpoint? This probably causes your debugger to stop. You can turn it off temporarily to just go through the code that has a lot of exception handling and then reenable it.

The debugger actually stops, because the internal implementation of the libraries (UIKit or the zombies implementation) uses exceptions to do control flow and catches them inside, so the app doesn't crash.

Alistra
  • 5,177
  • 2
  • 30
  • 42
  • It hasn't any exception. After it, code runs well. I mean... is not correct to init an extended UIButton with required init?(coder aDecoder: NSCoder) ?? – Fischer Feb 19 '17 at 11:59