sending sms programmatically in iphone
问题 How can you send an SMS programmatically to a particular number selected in the contact list in iPhone? 回答1: MFMessageComposeController is what you're looking for. To send an SMS, you're looking at something like this: #import <MessageUI/MessageUI.h> @interface myClass : NSObject <MFMessageComposeViewControllerDelegate>{ } @end @implementation -(void)sendMessage{ if([MFMessageComposeController canSendText]){ MFMessageComposeController *smsComposer = [[MFMessageComposeController alloc] init];