//1.设置阴影颜色
self.navigationController.navigationBar.layer.shadowColor = [UIColor blackColor].CGColor;
//2.设置阴影偏移范围
self.navigationController.navigationBar.layer.shadowOffset = CGSizeMake(0, 10);
//3.设置阴影颜色的透明度
self.navigationController.navigationBar.layer.shadowOpacity = 0.2;
//4.设置阴影半径
self.navigationController.navigationBar.layer.shadowRadius = 16;
//5.设置阴影路径
self.navigationController.navigationBar.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.navigationController.navigationBar.bounds].CGPath;
通过设置1.2.3步导航阴影就可以出现,如果对阴影有特别的需要,可再设置4.5这两个步骤.