我需要为我的webview创建一个自定义关闭按钮,看起来像带有阴影的白色X.像这样的东西:

它's not a problem for me to create something like this using just a regular letter 61946 , but in order to get exactly the same 61947 I need to use emoji. I'已经尝试过这个:

let button: UIButton = UIButton(frame: CGRect(x: 2, y: 2, width: 40, height: 40))
    button.backgroundColor = UIColor.clear
    button.setTitle("✖️", for: [])
    button.setTitleColor(UIColor.white, for: [])
let attributedEmoji = NSMutableAttributedString(string: "✖️", attributes: [NSAttributedStringKey.font:UIFont.systemFont(ofSize: 25)])  
    button.setAttributedTitle(attributedEmoji, for: [])
    button.addTarget(self, action: Selector(("buttonAction:")), for: .touchUpInside)
    self.view.addSubview(button)

但最后我仍然得到灰色的“X”,我不知道怎么用灰色的阴影让它变成白色,就像照片上的那个 . 我尝试了不同的方法,但我认为问题来自表情符号本身,因为我认为它是作为图像呈现并且默认情况下具有灰色 . 有什么技巧可以用来获得我需要的结果吗?