an eventbus implementation for ios developer
an eventbus implementation for ios developer
#usage
#import "NSObject+eventbus.h"
typedef enum{
sample_event_user_login,
sample_event_user_logout
} sample_event_t;
[self onEvent:sample_event_user_login cb:^(id sender,id ud){
NSLog(@"sample event useradata:%@",ud);
}
``
4. post event
```objc
[self postEvent:sample_event_user_login obj:nil];
[self unregisterEvent:sample_event_userlogin];