Last active
August 29, 2015 14:17
-
-
Save DTHENG/226a382fbceedb831f5f to your computer and use it in GitHub Desktop.
DTObservable create
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DTObservable *exampleObservable = [[DTObservable alloc] init:^(DTSubscriber *subscriber) { | |
NSDictionary *profile = @{ | |
@"firstName": @"Daniel", | |
@"lastName": @"Thengvall", | |
@"age": @25}; | |
// Lets pretend something cpu intensive happens here | |
[NSThread sleepForTimeInterval:1.f]; | |
[subscriber complete:profile]; | |
}]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment