UIImage
*navigationBarImg = [UIImage
imageNamed:@"navigationBar"];
//You must specified the BarMetrics for UINavigationBar, Otherwise it reports an exception.
[[UINavigationBar appearance] setBackgroundImage:navigationBarImg forBarMetrics:UIBarMetricsDefault];
//This is the key to eliminate drop shadow of UINavigationBar
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc]init]];