Custom Keyboard Crash

Hello,


I made a custom keyboard. Everything works fine except of two things:

(I am using Xcode 7 and am testing the app on my iPhone 5.)


1. When I turn the device from portrait to landscape or the other way round

sometimes it does not change the formation and crashs.


I wonder why this happens only sometimes and not every time the first time.



2. When my phone is not connected to Xcode it does not work like

when it is connected to the computer.

It crashs when I was not in the app for around 5-10 seconds and I open

it again then.

It does not pop up again and a restart is necessary.

This question would probably be best directed to the Cocoa Touch forum as it is not a question about the Swift language.

An addition: When I tilt it directly after the build to landscape and back to portrait without tapping something on it it also crashes with the formation issue.

Custom Keyboard Crash
 
 
Q