2016-09-16 57 views
0

如何手動禁用編輯textField。我有UIPickerView,我想用作inputView。但似乎我仍然有能力在文本框中複製粘貼。輸入視圖設置爲文本字段時禁用文本編輯

我發現這個question,似乎這就是我期待的,但消息人士低於不幫我

func textFieldShouldBeginEditing(textField: UITextField) -> Bool { 
    questionField.resignFirstResponder(); 
    // Additional code here 
    return false 
} 

鍵盤永遠不會屏幕在這種情況下。

回答

0

IQDropDownTextField

textfield.dropDownMode = .datePicker 
textfield.delegate = self 

//IQDropDownTextFieldDelegate 

    func textField(textField: IQDropDownTextField, didSelectDate date: NSDate?){} 

我做這樣嘗試。

相關問題