0

我有一个大问题,我正在开发一个西班牙语的应用程序,所以所有的标签和控件都需要用西班牙语。问题是当我从相机中挑选照片时,默认相机控件以英文显示:“拍照”、“取消”和“重拍”。我的问题是我是否可以自定义此按钮以使其以西班牙语显示:“Tomar Foto”、“Cancelar”和“Volver a tomar”。

这实际上是我的代码:

-(IBAction)takePhoto :(id)sender
{
    if (fotos.count <= 3) {
        UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];

        if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
        {
            [imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
        }
        imagePickerController.showsCameraControls = YES;

        // image picker needs a delegate,
        [imagePickerController setDelegate:(id)self];

        // Place image picker on the screen
        if([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0)
        {
            [[NSOperationQueue mainQueue] addOperationWithBlock:^{

                [self presentViewController:imagePickerController animated:NO completion:nil];
            }];
        }
        else
        {
            [self presentViewController:imagePickerController animated:NO completion:nil];
        }
    }
}
4

1 回答 1

0

[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"de", @"en", @"fr", nil] forKey:@"AppleLanguages"];

[[NSUserDefaults standardUserDefaults] 同步]; //使更改立即生效

于 2017-10-07T06:20:11.037 回答