做网站图片怎么做,wordpress实现301跳转详解,网站建设预付费入什么科目,wordpress如何安装模板文件夹我正在试图在我的视图控制器中的uiview的所有四个面上建立一个阴影,在我通过xcode向uiview添加约束之前,它工作得非常好。如何使uiview的阴影显示在所有四个边上,并为所有边设置约束?本质上,我发现,每当我通过xcode对我设置了阴影的uiview应用约束时,阴影不会出现在uiview的所…我正在试图在我的视图控制器中的uiview的所有四个面上建立一个阴影,在我通过xcode向uiview添加约束之前,它工作得非常好。如何使uiview的阴影显示在所有四个边上,并为所有边设置约束?本质上,我发现,每当我通过xcode对我设置了阴影的uiview应用约束时,阴影不会出现在uiview的所有四个边下。相反,它漂浮到左侧,完全离开右侧和底部,没有阴影。这可以在下面的屏幕截图中看到。class RegistrationViewController: UIViewController {IBOutlet weak var signUpView: UIView!override func viewDidLoad() {super.viewDidLoad()signUpView.clipsToBounds truesignUpView.layer.cornerRadius 20;signUpView.layer.shadowPath UIBezierPath(roundedRect: signUpView.bounds, cornerRadius: signUpView.layer.cornerRadius).cgPathsignUpView.layer.shouldRasterize truesignUpView.layer.shadowColor UIColor.black.cgColorsignUpView.layer.shadowOffset .zerosignUpView.layer.shadowOpacity 1signUpView.layer.shadowRadius 20signUpView.layer.masksToBounds false// Do any additional setup after loading the view.}}为什么会发生这种情况?如何在保持预期结果的同时添加约束?