I have a if/else statement in my objective-c code. The if/else statement runs like this:
-(void)textViewDidBeginEditing:(UITextView *)textView
{
if(textView==self.heardTextView)
{
NSString *string = textView.text;
if ([string rangeOfString:@"CLOSER"].location == NSNotFound)
{
NSLog(@"closest");
}
}
}
The premise of the if/else statement is - if the textview
equals a certain word some code will run. But this code isn't running.
I have put a breakpoint
on my code and a NSLOG
and nothing.