感觉swift能搜到的没有OC的多,所以好多出了错误的我都好半天解决不了,在这里记录一下
[xxx inputViewSet]: unrecognized selector sent to instance 0x7fe46600da00’
var window = (UIApplication.shared.windows.last!) as UIWindow
window.rootViewController = interfaceView
window.makeKeyAndVisible()
我这样写就会这样报错,感觉可能是内存管理的问题,我也不确定,搜没搜到,就自己试了一下
虽然这样说很不负责任,但是我也不知道为啥(等我知道了再来改吧),把window声明在外面就好了