Latest 1.0.5
License MIT
Platforms ios 7.0, requires ARC

CI Status

MUKSignal provides a mechanism to dispatch a signal to various subscribers.

Main features

MUKSignal is a simple class which exposes three main features.


You can dispatch a signal with a payload.

MUKSignal<NSString *> *signal = [[MUKSignal alloc] init];
[signal dispatch:@"Hello"];


You could add subscribers to a signal.

id const token = [signal subscribe:^(NSString *payload) {
    // Called after dispatch


A subscription could be temporarily suspended.

[signal suspend:token];
// Dispatches are not delivered
[signal resume:token];
// If a dispatch has occurred during suspension is delivered now (if more than one they are coalesced into one)

Specific signals

Library includes specific signals which are dispatched in particular conditions.


KVO signals observe an object and are dispatched when a change occurs.

MUKKVOSignal<NSString *> *signal = [[MUKKVOSignalChange alloc] initWithObject:self keyPath:@"name"];
[signal subscribe:^(MUKKVOSignalChange<NSString *> change) {
    NSLog(@"Name changed from '%@' to '%@'", change.oldValue, change.value);


Notification signals are dispatched when a notification fires.

MUKNotificationSignal *signal = [[MUKNotificationSignal alloc] initWithName:name:UIApplicationWillEnterForegroundNotification object:nil];
[signal subscribe:^(NSNotification *notification) {
    // App will enter foreground

UIControl target-action

Control action signals are dispatched when action for a control is triggered.

MUKControlActionSignal<UIButton *> *signal = [[MUKControlActionSignal alloc] initWithControl:self.button forEvents:UIControlEventTouchUpInside];
[signal subscribe:^(UIEvent *event) {
    // Called when button has been pressed


Observation is the concept to couple a signal to a particular subscription. It is particular useful when you have many signals to observe not to bloat your view controller.

MUKSignal *signal = ...;
MUKSignalObservation *observation = [MUKSignalObservation observationWithSignal:signal token:[signal subscribe:^(id payload) 
    // Waiting for a dispatch


  • iOS 7 SDK.
  • Minimum deployment target: iOS 7.


MUKSignal is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MUKSignal"


Marco Muccinelli, [email protected]


MUKSignal is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "MUKSignal",
    "version": "1.0.5",
    "summary": "Dispatch signals which could be subscribed by various subscribers.",
    "description": "Dispatch signals which could be subscribed by various subscribers. Subscription could also be suspended. This library also contains specific signals, like notification signals, KVO signals and control target-action signals.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Marco Muccinelli": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.5"
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "source_files": "Pod/**/*.{h,m}"

Pin It on Pinterest

Share This