• 1
name Punditsdkoslkdosdkoskdo

How to remove and add back navigationBar shadow in ios?

if I remove navigationBar shadow:

self.navigationController?.navigationBar.shadowImage = UIImage()

how I can add back this shadow?

From the docs.

The default value is nil, which corresponds to the default shadow image.

So it should be enough that you set

self.navigationController?.navigationBar.shadowImage = nil
  • 1
Reply Report