I’m looking forward to add a shadow on a NavigationBar in iOS5… For now, I’m using
m_navigationController.NavigationBar.Layer.ShadowColor = UIColor.Black.CGColor;
m_navigationController.NavigationBar.Layer.ShadowOffset = new System.Drawing.SizeF( 1f, 1f );
m_navigationController.NavigationBar.Layer.ShadowRadius = 3f;
m_navigationController.NavigationBar.Layer.ShadowOpacity = 1f;
This is C# but well, it works in Obj-C as well. However, this method does not longer work in iOS5, does anybody know how to get it work?
Try changing your code to this:
That’s Objective-C code. Make sure you
#import <QuartzCore/QuartzCore.h>at the top of your file.