Skip to content

ofxiPhoneKeyboard should have disable/enable methods for auto correction #684

Closed

Description

@mcanet

It is very annoying if you can not disable autocorrections in ofxiPhoneKeyboard. Specially for creative uses of this class. I add code how to add this feature.

[CODE] Add to ofxiPhoneKeyboard class:

  • (void)disableAutoCorrection;
  • (void)enableAutoCorrection;

//--------------------------------------------------------------
void ofxiPhoneKeyboard::disableAutoCorrection()
{
[keyboard disableAutoCorrection];
}
//--------------------------------------------------------------
void ofxiPhoneKeyboard::enableAutoCorrection()
{
[keyboard enableAutoCorrection];
}

  • (void)disableAutoCorrection
    {
    _textField.autocorrectionType = UITextAutocorrectionTypeNo;
    }
  • (void)enableAutoCorrection
    {
    _textField.autocorrectionType = UITextAutocorrectionTypeYes;
    }

Activity

  1. ghost assigned on Mar 10, 2012
  2. julapy commented on Sep 25, 2014

    @julapy
    Contributor

    a new method has been added to ofxiOSKeyboard which give access to the UITextField.
    please see code below.

    UITextField * textField = keyboard->getKeyboardTextField();
    [textField setAutocorrectionType:UITextAutocorrectionTypeNo];
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions