Apple says in its Documentation:
It is permissible to customize the appearance of the navigation bar using the methods and properties of the UINavigationBar class but you must never change its frame, bounds, or alpha values or modify its view hierarchy directly.
They never strictly mention that changing constraints is not allowed but I'm assuming it falls under the same criteria as of changing the frame.
I would need this for a messages app in order to achieve the translucency effect under the iMessage standard top bar. What I currently have is a UINavigationController
embedded in a MSMessagesAppViewController
with the topAnchor
set underneath the topLayoutGuide
. This prevents me from achieving the effect but places the navigation bar below the top bar accordingly. If I set the constraints to just attach to the topAnchor, the Navigation bar is hidden in the extended view. Changing the constraints of the UINavigationBar
here could solve the problem.
Am I allowed to change the constraints of the UINavigationBar
and if not, any other solutions for this issue? For any further information just tell me.