小编Tho*_*ten的帖子

iPhone编程:在UITextView中停用拼写检查

UITextAutocorrectionTypeNo对我不起作用.

我正在研究iPhone的填字游戏应用程序.问题在UITextViews中,我使用UITextFields作为每个字母的User-Input.通过触摸问题(UITextView),第一个答案char的TextField成为FirstRirstResponder.

一切正常但是UITextViews仍然是拼写检查并在问题中标记错误的单词,即使我将它们设置为UITextAutocorrectionTypeNo.

//init of my Riddle-Class

...

for (int i = 0; i < 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]; …
Run Code Online (Sandbox Code Playgroud)

spell-checking objective-c uitextview

9
推荐指数
3
解决办法
9994
查看次数

标签 统计

objective-c ×1

spell-checking ×1

uitextview ×1