title: iPhone Programming: Deactivate spell check in UITextView
body: <p>UITextAutocorrectionTypeNo didn't work for me.</p>
  
  <p>I'm working on a crossword app for the iPhone.
  The questions are in UITextViews and I use UITextFields for the User-Input of each letter.
  By touching a question(UITextView), the TextField for the first answer char becomesFirstResponder.</p>
  
  <p>It all works fine but the UITextViews are still spell checking and mark the wrong words in the question,
  even if I set them UITextAutocorrectionTypeNo .</p>
  
  <pre><code>//init of my Riddle-Class
  
  ...
  
  for (int i = 0; i &lt; theQuestionSet.questionCount; i++) {
  
      Question *myQuestion = [theQuestionSet.questionArray objectAtIndex:i];
      int fieldPosition = theQuestionSet.xSize * myQuestion.fragePos.y + myQuestion.fragePos.x;
   CrosswordTextField *myQuestionCell = [crosswordCells objectAtIndex:fieldPosition];
   questionFontSize = 6;
   CGRect textViewRect = myQuestionCell.frame;
  
   UITextView *newView = [[UITextView alloc] initWithFrame: textViewRect];
   newView.text = myQuestion.frageKurzerText;
   newView.backgroundColor = [UIColor colorWithRed: 0.5 green: 0.5 blue: 0.5 alpha: 0.0 ];
   newView.scrollEnabled = NO;
   newView.userInteractionEnabled = YES;
   [newView setDelegate:self];
   newView.textAlignment = UITextAlignmentLeft;
   newView.textColor = [UIColor whiteColor];
   newView.font = [UIFont systemFontOfSize:questionFontSize];
   newView.autocorrectionType = UITextAutocorrectionTypeNo;
   [textViews addObject:newView];
   [zoomView addSubview:newView];
   [newView release];
  }
  
  ...
  
  //UITextView delegate methode in my Riddle-Class
  
  -(BOOL)textViewShouldBeginEditing:(UITextView *)textView {
  
       textView.autocorrectionType = UITextAutocorrectionTypeNo;  
  
       for (int i = 0; i &lt; [questionSet.questionArray count]; i++) {
        if ([[[questionSet.questionArray objectAtIndex:i] frageKurzerText] isEqualToString:textView.text]) {
          CrosswordTextField *tField = [self textfieldForPosition:
              [[questionSet.questionArray objectAtIndex:i] antwortPos]]; 
          markIsWagrecht = [[questionSet.questionArray objectAtIndex:i] wagrecht];
          if ([tField isFirstResponder]) [tField resignFirstResponder];
               [tField becomeFirstResponder];
          break;
        }
   }
   return NO;
  }
  </code></pre>
  
  <p>I don't call UITextView on any other place.</p>