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.
|
/// Creates the item with the passed in action.
|
||||||
public static func create(with image: UIImage, actionModel: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) -> Self {
|
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)
|
button.set(with: actionModel, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
return button
|
return button
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the item with the passed in action map.
|
/// 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 {
|
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)
|
button.set(with: actionMap, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
return button
|
return button
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the item with the passed in action.
|
/// Creates the item with the passed in action.
|
||||||
public static func create(with image: UIImage, action: @escaping BarButtonAction) -> Self {
|
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
|
button.buttonAction = action
|
||||||
return button
|
return button
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user