使用ActivityViewController,Twitter预览表以英文显示,而不是iOS 6的语言设备

我正在使用新的ActivityViewController为用户提供在Facebook或Twitter上共享消息的可能性。 我已经更改了excludedActivityTypes属性,以便仅显示ActivityViewController上的Facebook和Twitterbutton。 在activityItems数组中,我只有一个NSString和文本共享。

这里是代码:

NSString *text = @"Text to share"; NSArray *activityItems = [NSArray arrayWithObjects:text, nil]; UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems: activityItems applicationActivities:nil]; // Indicamos los servicios estándar que no queremos mostrar NSArray *excludedActivityTypes = [NSArray arrayWithObjects:UIActivityTypePostToWeibo, UIActivityTypeMessage, UIActivityTypeMail, UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, nil]; avc.excludedActivityTypes = excludedActivityTypes; [self presentViewController:avc animated:YES completion:nil]; 

该设备configuration为西class牙语。

所以,当我在Facebook上select分享时,预览表以西class牙语显示(正常),但是当我selectTwitter时,Twitter预览表以英文显示。这不是很重要,但对用户来说不是很漂亮。 另外,它令我感到担心,它可能是一个更重要的事情的症状。

你知道为什么Twitter预览表出现在英语?

更新: ActivityViewIndicator的取消button也出现在英文中

非常感谢!

卡洛斯

最后我看到问题与本地化有关。 为了以任何语言查看所有系统视图控制器,您必须确保已经添加了.lproj目录,或者在info.plist中添加所需的所有语言的本地化密钥。

目前,我在info.plist中添加了西class牙文本地化的关键字,twitter表单开始以西class牙文出现。

我build议你使用新的iOS 6 API与Twitter和Facebook交互。 这使得它更容易。 这里是发送Tweet的代码

  if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; tweetSheet.completionHandler = ^(SLComposeViewControllerResult result) { switch(result) { case SLComposeViewControllerResultCancelled: break; // This means the user hit 'Cancel' case SLComposeViewControllerResultDone: // This means the user hit 'Send' break; } // dismiss the Tweet Sheet dispatch_async(dispatch_get_main_queue(), ^{ [self dismissViewControllerAnimated:NO completion:^{ NSLog(@"Tweet Sheet has been dismissed."); }]; }); }; [tweetSheet setInitialText:@"Tweeting from my own app! :)"]; [self presentViewController:tweetSheet animated:YES completion:NULL]; } else { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry" message:@"You can't send a tweet right now, make sure\ your device has an internet connection and you have\ at least one Twitter account setup" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; }