I used the sample code on the Apple Dev site to learn how to set pre-composed emails, but is there a way to set precomposed SMS messages, similarly?
相关问题
- CALayer - backgroundColor flipped?
- Listening to outgoing sms not working android
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
PresentModalViewController is now deprecated in IOS 6. So i used
whole code is as following
First you have to add the framework
MessageUI
to your project and import the library"MessageUI/MessageUI.h"
. Then conform to the protocol<MFMessageComposeViewControllerDelegate>
.Now to send an SMS:
To catch the result of the sending operation:
The body property on MFMessageComposeViewController allows you to set the message body just like you can for an email.
Check out the documentation: http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html
See this article on Apple's Dev Center:
Sending an SMS Message