0
这是我用来设置我的其中一个按钮的图像的当前代码。该按钮被设置为故事板的出口。无法为我的圆形按钮添加阴影 - Swift iOS Dev
userPictureButton.sd_setBackgroundImage(with: URL(string: currentUserData.photoURL), for: .normal)
userPictureButton.layer.cornerRadius = userPictureButton.frame.size.width/2
userPictureButton.clipsToBounds = true
每个向该按钮添加阴影的方法似乎在剪辑到边界= true时失败。当我有剪辑限制,我可以看到一个影子,但不再有一个圆形的按钮。
任何人都知道解决方案吗?
谢谢。