BSYNotificationCenter 1.0.0

BSYNotificationCenter 1.0.0

baishiyun 维护。



BSYNotificationCenter 是对通知的简单封装,开发者无需再关注那些移除问题,在方法中注册成功/接收到成功后直接删除。希望大家喜欢并Star支持

/**

单例

*/

+(BSYNotificationCenter *)shareCenter;

/**

添加通知 @param CenterName 通知名称 @param object 参数 @param SuccessRemove 注册成功后立即删除通知 (True:删除,False:不删除)

*/

-(void)bsy_RegisterCenterName:(nonnull NSNotificationName )CenterName object:(nullable id)object SuccessRemove:(BOOL)SuccessRemove;

/**

接受通知 @param addObserver 目标者 @param actionMothed 方法名称 @param CenterName 通知名称 @param SuccessRemove 接收到成功后立即删除通知 (True:删除,False:不删除) @param backBlock 接收到后回调

*/

-(void)bsy_addObserver:(id)addObserver ActionMothed:(NSString )actionMothed CenterName:(NSNotificationName )CenterName queue:(NSOperationQueue)queue SuccessRemove:(BOOL)SuccessRemove BackBlock:(Successted)backBlock;

/**

删除目标中的所有通知 @param observer 目标

*/

-(void)bsy_removeObserver:(id)observer;

/**

删除具体的通知 @param observer 目标 @param CenterName 通知名称

*/

-(void)bsy_removeObserver:(id)observer CenterName:(nonnull NSNotificationName )CenterName;