Latest 0.1.2
License Custom Copyright (C) 2012 Sergey Egorov
Platforms ios

Signals for Objective-C++


Let me show you how it’s easy to observe some object for notifications using TLSignal. For example, we’ve ExampleViewController, and we would like to know when his view is loaded:

#import "Signals.h"

@interface ExampleViewController : UIViewController

@property (nonatomic, readonly) TLSignal<UIView *> *viewDidLoadSignal;


@implementation ExampleViewController

tl_synthesize_signal(viewDidLoadSignal, UIView *);

    [super viewDidLoad];
    // Notifying watchers about viewDidLoad event


Easy, huh?

#import "AppDelegate.h"
#import "ExampleViewController.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options
    UIWindow window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.viewController = [[ExampleViewController alloc] initWithNibName:@"ExampleViewController" bundle:nil];

    // Subscribe to our event
    self.viewController.viewDidLoadSignal->addObserver(^(TLSignal<UIView *> *signal, UIView *targetView)
        targetView.backgroundColor = [UIColor blackColor];

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;



Licensed under the MIT license

Latest podspec

    "name": "TLSignals",
    "version": "0.1.2",
    "platforms": {
        "ios": null
    "license": {
        "type": "Custom",
        "text": "Copyright (C) 2012 Sergey Egorov"
    "summary": "Observer pattern with compile-time type checking for Objective-C.",
    "homepage": "",
    "authors": {
        "Sergey Egorov": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.2"
    "source_files": "TLSignals/*.{h,m, mm, cpp}",
    "requires_arc": false

Pin It on Pinterest

Share This