如何快速更改UIContextualAction的大小

时间:2019-12-17 06:30:45

标签: ios swift iphone uicontextualaction

我正在尝试更改上下文操作视图的大小。但是我只能更改图像大小并修改标签

let call =  UIContextualAction(style: .normal, title: "Call", handler: { (action,view,completionHandler ) in
                //do stuff
                completionHandler(true)
            })

     call.image = UIGraphicsImageRenderer(size: CGSize(width: 10, height: 10)).image {
     _ in UIImage(named: "call")!.draw(in: CGRect(x: 0 , y: 0, width: 10, height: 10))

}
call.backgroundColor = .black

0 个答案:

没有答案