MFMessageComposeViewController后没有显示键盘(Keyboard not showing after MFMessageComposeViewController)
在iPhone应用程序中,我有一个
UITextView
和一个按钮,它允许用户将UITextView
的内容作为文本消息发送。 代码如下所示:MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; picker.messageComposeDelegate = self; picker.body = textView.text; [self presentModalViewController:picker animated:YES];
一切工作正常,除了消息发送时或在
MFMessageComposer
点击Cancel时: 即使光标闪烁,UITextView
的键盘也不再显示 。我尝试了一些东西,包括按钮代码和
-viewDidDisappear
的[textView resignFirstRepsonder]
。MFMessageComposeViewControllerDelegate
方法中的[textView becomeFirstResponder]
或-viewDidAppear
不会更改任何内容...有任何想法吗?
In an iPhone app I have a
UITextView
and a button, which lets the user send the content of theUITextView
as a text message. The code looks like this:MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; picker.messageComposeDelegate = self; picker.body = textView.text; [self presentModalViewController:picker animated:YES];
Everything works fine, except for when the message is either sent or Cancel is tapped in the
MFMessageComposer
: The keyboard for theUITextView
is not shown anymore, even though the cursor blinks.I tried a few things, including a
[textView resignFirstRepsonder]
in both the button code and-viewDidDisappear
.[textView becomeFirstResponder]
in theMFMessageComposeViewControllerDelegate
method or the-viewDidAppear
didn't change anything either...Any ideas?
原文:https://stackoverflow.com/questions/4768425
满意答案
首先想到的是我注意到标签标签没有关闭“>”。 它不在HTML代码中,但表单标签的ID是否为“form”?
两行var $ answer ...和var answer ...可以合并为
var answer = $('#unit_name').val();
最后,在你的html代码中,你有一个id =“result”的div(或其他标签)吗? 如果是这样,它隐藏了吗? 如果它是隐藏的,设置完信息后,您需要取消隐藏。
First think I noticed is that the label tag doesn't have a closing ">". It isn't in the HTML code, but does the form tag have an id of "form"?
The two lines var $answer... and var answer... could be combined to
var answer = $('#unit_name').val();
Lastly, in your html code, do you have a div (or other tag) with an id="result"? If so, is it hidden? If it is hidden, after setting your message, you will need to un-hide it.
相关问答
更多如何清除jQuery验证错误消息?(How to clear jQuery validation error messages?)
jquery验证错误消息不隐藏,为什么(Jquery validation error messages are not hiding, why)
JQuery自定义验证错误(JQuery custom validation error)
更改jquery验证错误消息(Changing jquery validation error message)
我的JQuery验证错误(Error in my JQuery validation)
文本框上的JQuery验证错误(JQuery Validation Error on textbox)
jquery在验证错误后触发(jquery triggered after validation error)
使用jquery进行验证(validation using jquery)
jQuery验证 - 语法错误(jQuery validation - syntax error)
jQuery验证错误消息位置(jQuery validation error message location)
相关文章
更多Android EditText软键盘显示隐藏以及“监听”
登录界面与Android软键盘显示、隐藏的交互设计
用C#捕捉键盘和鼠标
关于jsp中的分页显示问题
在线文档显示打印
dreamweaver 8 与 ie 7 的显示的效果不同?
freemarker的时间显示如何处理啊
EditorGridPanel中ComboBox显示问题?
js页面显示广告
Obama says economy moving in right direction
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!