Newbie Questions Newbie Questions - 1 year ago 98
iOS Question

How to add a shadow effect for UINavigation bar?

Do you have to add it programmatically? Or there is an option from the main.storyboard interface builder?and if there is a way from storyboard , How do you add it ?

Something like this :


Answer Source

You would have to add it programatically.

Do this in your UINavigationController Class

self.navigationBar.shadowColor = UIColor.blackColor().CGColor
self.navigationBar.shadowOffset = CGSizeMake(5, 5)
self.navigationBar.shadowRadius = 5
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download