【发布时间】:2020-04-08 08:49:30
【问题描述】:
我想自定义 iOS 13+ 上下文菜单上的操作按钮
菜单是这样的:
我想我可以像 UIAlertController 这样设置自定义字体:
let action = UIAction(title: "asdasd") { _ in}
let attributeString = NSMutableAttributedString(string: action.title)
attributeString.addAttributes([NSAttributedString.Key.font : font], range: NSMakeRange(0, action.title.count))
action.setValue(attributeString, forKey: "attributedMessage")
但它不是那样工作的,那是怎么回事?
【问题讨论】:
-
没有。虽然我想使用自定义字体...
标签: swift fonts contextmenu ios13 custom-font