I\'m trying to get the UITextViewTextDidChangeNotification to work. I\'m new to using the NSNotificationCenter, so I\'m having a hard time understanding what\'s going on exactly
Alright, so I figured out a solution. I needed to post the notification in the textViewDidChange function. I did that using this:
NSNotificationCenter.defaultCenter().postNotificationName("keyPressed", object: nil)
Then I recognized the notification in my viewDidLoad function with this:
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyPressed:"), name:"keyPressed", object: nil);
Then I made this function under my viewDidLoad function:
func keyPressed(sender: NSNotification) {
}