UIBarButtonItems in navigation bar do not respond after navigation bar origin changed

The UIbarButtonItems in an iOS/ Swift app navigation bar in a view controller do not respond to clicks after navigation bar origin changed in the viewWillTransition event.

The action function is called if the click occurs in the place where the UIBarButton was before the origin was shifted

UIBarButtonItems in navigation bar do not respond after navigation bar origin changed
 
 
Q