Simple implementation of iOS notification hubs-yrsignal

Source: Internet
Author: User

IOS native Notification Center for Nsnotificationcenter, this time with less than 300 lines of code, to achieve a similar notification of signal transmission, and further expansion of functionality.
The library name is yrsignal, which means signal: https://github.com/YueRuo/YRSignal/

The special is as follows:
1. All listeners can know who the sender is when they receive the corresponding signal
2. The listener can give the response information after processing the signal.
3. The sender can know who handled the corresponding information and what the reply message was given after processing.
4. If the listener forgets to remove itself, there will be no unsafe crashes (it is recommended to develop a good habit of removing).

This library consists of three parts:
Yrsignal class: The underlying Signal object
Yrsignalbus class: Responsible for signal scheduling, including registration, removal, and corresponding triggering
Nsobject+yrsignal class: An extension to nsobject that makes it easy for all objects to add, remove, and send messages.

Interested students can download the study, Welcome to Exchange.

Copyright NOTICE: This article is for bloggers original article, welcome reprint but please keep the article source. http://blog.csdn.net/u010124617

Simple implementation of iOS notification hubs-yrsignal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.