In what situation self.view.endEditing(true) and self.view.endEditing(false) produce different results?
self.view.endEditing(true)
self.view.endEditing(false)
Documents for func endEditing(force: Bool) -> Bool specify the following for the force parameter:
func endEditing(force: Bool) -> Bool
force
Indicate true to force the first responder to resign, regardless of whether he wants to do so.
true
As a comment mentioned, if canResignFirstResponder returns false, self.view.endEditing(true) will cause the control to lose focus, but self.view.endEditing(false) will not.
canResignFirstResponder
Source: https://habr.com/ru/post/1243648/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1243643/android-60-marshmallow-readcontacts-permission-allows-to-read-contacts-name-when-permission-is-denied&usg=ALkJrhjqtvLvr_fSEakZsN790csgyme7pgUsing the AWS Gateway API, can I access cookies? - amazon-web-servicesDynamoDB sequentially reads for Global Secondary Index - asp.nethow to use select all option in checklist in swing java? - javaionic add android android with custom android target - androidAre C ++ references guaranteed to use pointers "internally"? - c ++Running NUnit Tests in .NET Core with ReSharper - .netHow to implement App Intro with animation of joint viewing - androidPostgis is not an affordable database backend - djangoputs and printf in C - cAll Articles