What to check
It seems that several other SO users have had similar experience in different environments. Check stream . Since there may be many events that cause this problem, you may need to look at the stream provided to see if a suitable use case can be found. It is not clear how you reject the keyboard, but you can call something like this a method or a sign of gesture recognition (rather than direct dismissal from a specific object):
UIApplication.sharedApplication().sendAction("resignFirstResponder", to: nil, from: nil, forEvent: nil)
From the flow provided, the nature of the problem in most cases was a duplicate call during the presentation or dismissal of the presentation. I also saw problems with connecting the segue storyboard (or in some cases it was deleted, but the xml was still in the representation of the storyboard code) and using the code (seGue) (performSegueWithIdentifier ...) for the same animation (which causes two call display / dismissal).
I would look in the log to see which calls are being logged immediately before the error, and then search the log window to see if there is an excess call. Again, there may be redundancy in the behavior / animation / layouts on the storyboard and calls made in the code.
UPDATE
The OP comments reminded me that in some cases, especially when it comes to calls during presentations / dismissals, I saw examples where the only way to successfully work with developers is to associate it with a dispatch_async call. There are some critical system calls that seem to be inoperative if the developer code is entered during the same frames.
A specific example is this call, which is within willMoveToWindow . In this case, I have a weakSelf reference to the view and just look at the newWindow value for nil (indicates that the view is rejected) before calling my code.
So, in this example, if you delete the dispatch call, the developer code will cause the entire application to crash. I assume that system transition calls (related to transposing to / from a window) may contradict those requests of developers that were at that time.
dispatch_async(dispatch_get_main_queue(), { () -> Void in //the saved flag is true only when user hits the done button if !(weakSelf!.saved) { weakSelf?.completeNotes(nil) } })
Tommie C. Nov 25 '15 at 16:59 2015-11-25 16:59
source share