Search code examples
iosexc-bad-accessuiwindow

UIWindow makeKeyWindow returns an EXC_BAD_ACCESS


[[[[UIApplication sharedApplication] delegate] window] makeKeyWindow];

I've been trying to look up another way to do this exact same action but I haven't found anything. What happens is when this is fired, the debugger returns

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x6f6d6582). The process has been returned to the state before execution.

What ends up happening is my entire UI becomes frozen and accepts no touch events because the main window is no longer the key window. Anyone have any ideas on how to fix this? Im using David Keegan's KGModal and its in the cleanup: that this is being fired.


Solution

  • I have decided to write in my own animation to present something modally. After just a few hours of work I got everything working.