[英]Iphone sms app issue
我要提出一個應用程序,在該應用程序中我必須向我的聯系人列表發送相同的短信。 我正在使用
Class messageClass = (NSClassFromString(@"MFMessageComposeViewController"));
if (messageClass != nil)
{
MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init] autorelease];
if([MFMessageComposeViewController canSendText])
{
if ([appdelegate.NumberArray count] > 0) {
NSString *aa = [appdelegate.NumberArray objectAtIndex:0];
NSMutableArray *myArray = [aa componentsSeparatedByString:@","];
NSString *n = [myArray objectAtIndex:0];
NSString *m=[myArray objectAtIndex:1];
NSString *new = [appdelegate.globalmsg stringByReplacingOccurrencesOfString: @"forgot" withString:n];
controller.body = new;
controller.recipients= [NSArray arrayWithObject:m];
controller.messageComposeDelegate = self;
//if([appdelegate.NumberArray count] ==2 ){
[self presentModalViewController:controller animated:YES];
我從易變的陣列中逐一取出我的聯系。 問題是我的程序一次發送一個短信,而不是發送到完整列表。 如果我想發送短信給下一個人,我必須再次單擊發送按鈕。 有什么方法可以將短信發送給所有人,而無需再次單擊該發送按鈕?
您可以檢查此應用程序...。 http : //itunes.apple.com/us/app/automatic-custom-sms/id409247779在此應用程序的最后一頁會自動出現,並從您的聯系人列表中發送所有信息。 ??
好吧,我修復它。 我使用局部變量在視圖中初始化了它並加載了值0,然后在視圖中出現了將其更新為1,並使當前模型視圖出現,直到我的數組完成。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.