How to prevent inputAccessoryView of a view controller from being shown when an alert is presented?
NickName:user11497206 Ask DateTime:2020-02-04T16:42:27

How to prevent inputAccessoryView of a view controller from being shown when an alert is presented?

I have a custom UIViewController in which I have overridden inputAccessoryView to return a view as follows-

extension LoginViewController {
    override var inputAccessoryView: UIView? {
        CustomToolbar()
    }
}

The inputAccessoryView is shown when an UIAlertController is presented by the view controller.

Can anyone point out how to prevent inputAccessoryView from being shown when an alert is presented?

Copyright Notice:Content Author:「user11497206」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60053541/how-to-prevent-inputaccessoryview-of-a-view-controller-from-being-shown-when-an

More about “How to prevent inputAccessoryView of a view controller from being shown when an alert is presented?” related questions

How to prevent inputAccessoryView of a view controller from being shown when an alert is presented?

I have a custom UIViewController in which I have overridden inputAccessoryView to return a view as follows- extension LoginViewController { override var inputAccessoryView: UIView? {

Show Detail

Prevent view controllers from being presented when alert is there

I have some code that asynchronously checks for errors and if an error happens, it shows an alert using window.rootViewController?.present(...) Sometimes, this happens right before a view controll...

Show Detail

inputAccessoryView animating down when alertController (actionSheet) presented

I have an inputAccessoryView for a chat app that always remains visible and docked at the bottom of the screen for text input similar to most messaging apps. When I present an alertController with

Show Detail

Modal View destructor not being called when InputAccessoryView is overriden

I am presenting a UIViewController modally and that view contains various UITextFields. I've overriden the modal views InputAccessoryView so that it shows a simple view, with one button that will

Show Detail

Prevent resizing of a view controller presented as a sheet?

Is there a way to prevent a view from being resized if the view controller is presented as a sheet using the method presentViewControllerAsSheet or using a segue of style "sheet"? Note that modal/...

Show Detail

Presenting a UIAlertController from a modally presented controller that is being dismissed

Prior to iOS 8, a UIAlertView could be displayed from a modally presented UIViewController at the same time that the UIViewController was dismissed. I found this to be especially useful when a user

Show Detail

Determine how a view controller is being presented

I am presenting a view controller modally with its UIModalPresentationStyle set to the adaptive style UIModalPresentationPopover. This style when in a horizontally compact environment (iPhone portr...

Show Detail

Controls not dimming when view controller is presented locally and alert displayed

When I present a UIAlertController over a view controller, the controls are dimmed as expected. However, if the same view controller is itself modally presented, the display of the alert controlle...

Show Detail

prevent inputAccessoryView from displaying when presenting viewController

I have a viewController with an inputAccessoryView that is displayed as below: override var inputAccessoryView: UIView? { get { return myInputView } } override var canBecomeFirstResp...

Show Detail

Will low memory prevent a modal view controller from being displayed?

I have a view controller that I would like to present in a modal fashion, but it will not appear. I think it's because whilst in the Image Picker I see this in the console: 2010-12-06 22:44:28.076

Show Detail