Sometimes, a view will appear on your screen and you don't know how it got there. Did your app add it? Did the SDK add it? Here's how to get the debugger to stop right where it was added so you can look at the call stack.
First, set up a symbolic breakpoint on [UIView addSubview:]
Then run the app until it hits the first symbolic breakpoint. You'll be at some assembly that looks like this:
Set a breakpoint right where I've pointed out above. Disable the symbolic breakpoint so now all that will break is this new breakpoint you've just set. Run your app again.
Each time you hit this breakpoint, the registers $eax
and $ecx
will be available to you. $eax
will contain the address to the view being added as a subview. $ecx
will contain the address to the view adding the subview.
Keep hitting continue (control + command + Y) and checking the registers until you find the view you're looking for: