我正在为使用Xcode 7.2制作的iOS应用构建.api文件,我的页面中有两个字段 - 电子邮件和电话。当我尝试在文本字段中编辑电子邮件或电话时,会出现键盘。
隐藏键盘的手柄
答案 0 :(得分:0)
实施委托方法
mydict = {'Car':'BMW','Speed':'kph','Range':33}
for keys in mydict:
print(keys)
答案 1 :(得分:0)
键盘问题 - 因为ViewController中的UIControl ..
在UIControl和电子邮件下添加了整个UI,在scrollview(TPKeyboardAvoidingScrollView)下添加了Phone Textfield, 在UIControl OnTouchdown动作键盘隐藏处理..
现在删除了UI中的UIControl插座,操作和类。 键盘隐藏处理Touch Gestures ..
现在键盘隐藏在所有情况下..它的工作正常,当构建ipa或调试时..
问题已解决..
答案 2 :(得分:0)
对于键盘完成按钮:实现委托方法
- (void) textFieldShouldReturn:(UITextField)textField
{
[self.emailTF resignFirstResponder];
[self.phoneTF resignFirstResponder];
}
更新按钮:实施方法
- (void)updateButtonClick:(UIButton *)button
{
/the code you want to write.../
[self.emailTF resignFirstResponder];
[self.phoneTF resignFirstResponder];
}
触摸self.view返回keyBoard:实现方法
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self.emailTF resignFirstResponder];
[self.phoneTF resignFirstResponder];
}
希望这个答案可以帮助你:)