Currently I\'m working on a multi-language application and I want to change the Cancel ,Use and Retake button titles of the UIIm
Only good solution is here...
//this is your camera method
- (void)startCameraControllerUsingDelegate:(id)delegate gallery:(BOOL)openGallery
{
if (([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == NO)
|| (delegate == nil))
return;
UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
if (openGallery) {
cameraUI.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
} else {
cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
}
cameraUI.allowsEditing = YES;
//set your delegate type UINavigationControllerDelegate here! It will trigger function bellow!
cameraUI.delegate = delegate;
[self presentViewController:cameraUI animated:YES completion:nil];
}
//UINavigationControllerDelegate function
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
//this is where magic happends! This leaves button empty and it will not ruin title center position!... or give it your desired string
viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
}