在 iOS 上使用 PencilKit,如何将橡皮擦工具设置为 .bitmap 用于 PKToolPicker?
我找不到 PKToolPicker 的任何设置。尝试使用 PKCanvasView 观察并将工具的擦除器类型设置为 .bitmap 也不起作用。
override func toolPickerSelectedToolDidChange(_ toolPicker: PKToolPicker) {
var tool = toolPicker.selectedTool as? PKEraserTool
if tool != nil {
tool?.eraserType = .bitmap
}
}