The message UINavigationItem.prompt appears. How to listen to the new invitation?

I have a regular UINavigationController with the UIViewController contained in it, when my view controller has a request applied to it (via UINavigationItem.prompt = @ "some prompt"), the prompt animates the UIViewController view down.

My question is: is there an apple to find out that a prompt will appear (and, possibly, the animation time it will take) so that I can relay the presentation? For example: therefore, the content does not move. Or I need to write this functionality myself. What I'm really looking for is a notification similar to the KeyboardWillShow / Hide notification.

Note that the controller is not an object using the prompt, and the prompt will appear and disappear asynchronously. Do not look for code, just advice.

+3
source share
1 answer

You can always use kvo to get a callback when the value changes. As for time, it can only be the default value (0.25 seconds), or it can use a constant UINavigationControllerHideShowBarDuration. I assume that you really only need to get it “close enough” when working with this animation.

+1
source

Source: https://habr.com/ru/post/1721751/


All Articles