Created
November 24, 2014 18:55
-
-
Save twilly86/61e99b4f2dd8ecf90fb7 to your computer and use it in GitHub Desktop.
Swift RAC Reactive Cocoa Array Example
This file contains 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
class RootViewController: UIViewController { | |
var numberArray : [Int] = [] | |
// this is intentionally blank | |
override func viewDidLoad() { | |
var signal = RACObserve2(self.numberArray, "property") | |
signal.subscribeNext { (object) -> Void in | |
if let tuple = object as? RACTuple { | |
//var wholeArray = tuple.first as? NSArray | |
//var changeDictionary = tuple.second as? NSDictionary | |
NSLog("here") | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment