在我的设计导航的应用程序有很好的阴影,我想在我的代码中应用.如何才能创造出这种效果?
没有添加视图
self.navigationController?.navigationBar.layer.masksToBounds = false self.navigationController?.navigationBar.layer.shadowColor = UIColor.lightGray.cgColor self.navigationController?.navigationBar.layer.shadowOpacity = 0.8 self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0, height: 2.0) self.navigationController?.navigationBar.layer.shadowRadius = 2