发送委托的MFMessageComposeViewController短信(MFMessageComposeViewController sms sent delegate)
我在我的应用程序MFMessageComposeViewController中实现了发送短信。 它运作良好,但我不知道是否可以知道消息实际发送的时间。
-(void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSArray *)recipients { MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]) { controller.body = bodyOfMessage; controller.recipients = recipients; controller.messageComposeDelegate = self; [self presentModalViewController:controller animated:YES]; } } - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { [self dismissModalViewControllerAnimated:YES]; if (result == MessageComposeResultCancelled) { NSLog(@"Message cancelled"); } else if (result == MessageComposeResultSent) { NSLog(@"Message sent"); } }
if(result == MessageComposeResultSent)仅对应于“发送”按钮,但如果消息已发送,则不会发出警告。 你知道是否有某种方式委派或知道短信是否被发送?
非常感谢!
I implemented in my app MFMessageComposeViewController for send sms. It works well, but I do not know if it is possible to know when the message is actually sent.
-(void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSArray *)recipients { MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]) { controller.body = bodyOfMessage; controller.recipients = recipients; controller.messageComposeDelegate = self; [self presentModalViewController:controller animated:YES]; } } - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { [self dismissModalViewControllerAnimated:YES]; if (result == MessageComposeResultCancelled) { NSLog(@"Message cancelled"); } else if (result == MessageComposeResultSent) { NSLog(@"Message sent"); } }
if (result == MessageComposeResultSent) corresponds only to the button "send" but not really a warning if the message has been sent. Do you know if there is some way to delegate or know if the SMS was sent or not?
Thanks a lot!
原文:https://stackoverflow.com/questions/8778444
满意答案
我明白了,它应该是
PARAMS [:hds_persona]
在我的create-method中。
谢谢!
I got it, it should be
params[:hds_persona]
in my create-method.
Thank you!
相关问答
更多Angular:将参数从$ routeProvider传递给控制器(Angular: Passing params from $routeProvider to controller)
表格数据是通过会话还是参数传递的?(Is form data passed through session or params?)
Angularjs:将对象传递给状态(Angularjs: passing an object params to state)
如何将单个对象[]传递给params对象[](How to pass a single object[] to a params object[])
订阅activatedRoute,params具有不同的属性来保存传递的参数值(subscribing to activatedRoute, params has different attributes to hold the param value passed)
比较params对象数组(Compare params array of objects)
如何在Javascript中读取从C#传递的params object []项?(How to read params object[] items passed from C# in Javascript?)
Ember.js将params对象传递给linkTo或action helper(Ember.js pass params object to linkTo or action helper)
没有传递给新行动的参数(Params not being passed to new action)
Params没有传递给对象?(Params dont get passed to the object?)
相关文章
更多微信开发之移动手机WEB页面(HTML5)Javascript实现一键拨号及短信发送功能
.NET 微信开放平台接口(接收短信、发送短信)
.NET 微信开放平台接口(接收短信、发送短信)
实现友盟分享
从iMessage到微信,QQ离线短信服务,米聊,易信
微信流行,短信没落
Java 发送邮件
Kafka发送消费的路由
发送内容给微信
基于android开发金山卫士备份短信视频教程-android项目实战
最新问答
更多获取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),本站将尽快处理。谢谢合作!