- (void)sendMessage
{
if ([MFMessageComposeViewControllercanSendText]) {
MFMessageComposeViewController *picker = [[MFMessageComposeViewControlleralloc] init];
picker.messageComposeDelegate = self;
NSLog(@"info.long code:%@", self.activityInfo.longcode);
picker.recipients = [NSArray arrayWithObject:[NSString stringWithFormat:@"%@", self.activityInfo.longcode]];
[self.navigationControllerpresentModalViewController: picker animated:YES];
}
else {
UIAlertView* alert = [[UIAlertViewalloc] initWithTitle:@"提示"message:@"您的设备不能发送短信!" delegate:selfcancelButtonTitle:@"确定"otherButtonTitles:nil, nil];
[alert show];
}
}