How to disable iOS 8 emoji keyboard?

前端 未结 12 2164
说谎
说谎 2020-12-03 00:33

Is there any option to stop showing the emoji keyboard in iOS 8? It is not available in numpad and secure text but for email it is there. If it is not possible to disable i

12条回答
  •  佛祖请我去吃肉
    2020-12-03 01:19

    In Swift : - It Will restrict the to past the emoji in your TextView and Just change the keyboard type to ascii capable

    func textView(textView: UITextView, shouldChangeTextInRange range: NSRange, replacementText text: String) -> Bool {
        var result = Bool()
    
                let disallowedCharacterSet1 = NSCharacterSet.symbolCharacterSet()
                let replacementStringIsLegal = text.rangeOfCharacterFromSet(disallowedCharacterSet1) == nil
                result = replacementStringIsLegal
    
    
            let newLength = textView.text!.utf16.count + text.utf16.count - range.length
            return newLength <= 300 && result // Bool
    
    }
    

提交回复
热议问题