// start-HOOKFunctions-Service
AOPNBPCoreManagerCenter.getInstance().startService()
// start-upload-Service
AOPEventUploadCenter.getInstance().startService()
AOPEventUploadCenter.getInstance().progressAction = { strResult , handle in
}
// extends the superclass : GodfatherSwizzing plz.
class ApplicitonSwizzing: GodfatherSwizzing {
// application-sendAction
let appSendActionBlock:@convention(block) (_ id: AspectInfo)-> Void = { aspectInfo in
let event = AOPEventFilter.appFilter(aspectInfo: aspectInfo)
GodfatherSwizzingPostnotification.postNotification(notiName: Notification.Name.InspurNotifications().appSendActions,
userInfo: [AOPEventType.applicationSendaction:event])
}
// navigation-pop(custom btn replace the sys navigationBar-backBtn)
let navigationPopBlock:@convention(block) (_ id: AspectInfo)-> Void = { aspectInfo in
}
// application sendaction
override func aopFunction() {
do{
try UIControl.aspect_hook(#selector(UIControl.sendAction(_:to:for:)),
with: .init(rawValue: 0),
usingBlock: appSendActionBlock)
try UINavigationController.aspect_hook(#selector(UINavigationController.popViewController(animated:)), with:
.init(rawValue: 0), usingBlock: appSendActionBlock)
}catch {}
}
}