fix to action block
MF call super
This commit is contained in:
parent
fc8f189b77
commit
cbe1c04386
@ -27,21 +27,21 @@ public typealias BarButtonAction = (BarButtonItem) -> ()
|
||||
|
||||
/// Creates the item with the passed in action.
|
||||
public static func create(with image: UIImage, actionModel: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Self {
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock))
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock(_:)))
|
||||
button.set(with: actionModel, delegateObject: delegateObject, additionalData: additionalData)
|
||||
return button
|
||||
}
|
||||
|
||||
/// Creates the item with the passed in action map.
|
||||
public static func create(with image: UIImage, actionMap: [AnyHashable : Any], delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Self {
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock))
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock(_:)))
|
||||
button.set(with: actionMap, delegateObject: delegateObject, additionalData: additionalData)
|
||||
return button
|
||||
}
|
||||
|
||||
/// Creates the item with the passed in action.
|
||||
public static func create(with image: UIImage, action: @escaping BarButtonAction) -> Self {
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock))
|
||||
let button = self.init(image: image, style: .plain, target: self, action: #selector(callActionBlock(_:)))
|
||||
button.buttonAction = action
|
||||
return button
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user