App crash when assigning nil to menuItems *Fix inside*
opened this issue · comments
Deleted user commented
I can't pull request the branch so this it the problem and fix
private extension UIMenuController {
@objc class func _mik_load() {
if true {
## guard UIMenuController.shared.menuItems != nil else { return }
let selector = #selector(setter: menuItems)
let origIMP = class_getMethodImplementation(self, selector)
typealias IMPType = @convention(c) (AnyObject, Selector, AnyObject) -> ()