GithubHelp home page GithubHelp logo

leomobiledeveloper / qteventbus Goto Github PK

View Code? Open in Web Editor NEW
425.0 425.0 70.0 202 KB

iOS事件总线,支持AppDelegate解耦,支持基于响应链的局部总线

License: MIT License

Ruby 1.27% Objective-C 98.73%
appdelegate eventbus ios module notification objective-c

qteventbus's Introduction

qteventbus's People

Contributors

leomobiledeveloper avatar zhwayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qteventbus's Issues

移除子节点时候, 是否需要移除字典中的子节点?

- (void)removeNodeForId:(NSString *)uniqueId{
    //不存在
    if (![_registeredNodeTable objectForKey:uniqueId]) {
        return;
    }
    _QTEventBusLinkNode * node = [_registeredNodeTable objectForKey:uniqueId];
    if (node == _head) {
        _head = _head.next;
    }
    if (node == _tail) {
        _tail = _tail.previous;
    }
    _QTEventBusLinkNode * previousNode = node.previous;
    _QTEventBusLinkNode * nextNode = node.next;
    node.next = nil;
    node.previous = nil;
    previousNode.next = nextNode;
    nextNode.previous = previousNode;
}

将 node移除时候, 是否需要 [_registeredNodeTable removeObjectForKey:uniqueId]; 操作....

问个问题

我发现 pod QTEventBus 那么uikit的部分没有?应该怎么pod呢?

多次触发事件

if (eventType && isCFNotifiction) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:eventType object:nil];
}

如果是同一个eventType 这里会进来多次 导致多次触发事件

问题

简单看了一眼代码,思路很好,代码也很牛逼,但是感觉没什么好的应用场景啊,那个APPDelegate解耦 感觉,变得更加复杂了,你觉得呢,不过你这个**很值得学习,还有代码写的很逼格,赞

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.