2011-09-25 72 views
0

我可以通過UIImagePickerController和sourceType = UIImagePickerControllerSourceTypeCamera;ios UIImagePickerController拍照按鈕標題

我想知道如何製作基於設備語言的按鈕標題。

現在取消按鈕,它只顯示「取消」。 我如何使取消按鈕基於不同的語言?

Thx

回答

0

簡單的答案是你不能,除非你使用自定義選取控制器。我認爲它應該根據設備語言自動更改,但我認爲我錯了。

0

,可以用下面的代碼來完成,只需更改與取消完成標題和挑起dismissViewController:

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { 

    UINavigationItem *ipcNavBarTopItem; 

    // add done button to right side of nav bar 
    UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@\"Done\" 
          style:UIBarButtonItemStylePlain 
          target:self 
          action:@selector(saveImages:)]; 

    UINavigationBar *bar = navigationController.navigationBar; 
    [bar setHidden:NO]; 
     ipcNavBarTopItem = bar.topItem; 
     ipcNavBarTopItem.title = @\"Pick Images\"; 
    ipcNavBarTopItem.rightBarButtonItem = doneButton; 
} 
相關問題