Today call system photography and local album, edit the function of the picture, but the button is English, I want to change the Chinese cancel, select, re-shoot
Two methods need to be changed
1. The Cancel and choose buttons on the Uiimagepickercontroller page, as well as the snap button, want to change to Chinese
Originally intended to be set by obtaining pointers to these buttons, the final discovery can be directly project-->info-->localization in the project--->language add a simplified Chinese
Reference: http://www.cocoachina.com/bbs/read.php?tid=132828
2. Customization of course there are ways
The recursive method is used to continually iterate through the Self.view hierarchy until the view is found and its pointer is manipulated.
-(UIView *) Findview: (UIView *) Aview withname: (NSString *) name{class CL = [Aview class]; NSString *DESC = [cl description]; if ([name Isequaltostring:desc]) return aview; For (UIView *view in aview.subviews) {Class CLL = [view Class]; NSString *stringl = [CLL description]; if ([Stringl Isequaltostring:name]) {return view; }} return nil;} -(void) Addsomeelements: (Uiviewcontroller *) viewcontroller{UIView *plcameraview = [Self FindView:viewController.view withname:@ "Plcameraview"]; UIView *plcropoverlay = [self findview:plcameraview withname:@ "Plcropoverlay"]; UIView *bottombar = [self findview:plcropoverlay withname:@ "Plcropoverlaybottombar"]; Uiimageview *bottombarimageforsave = [Bottombar.subviews objectatindex:0]; UIButton *retakebutton=[bottombarimageforsave.subviews objectatindex:0]; [Retakebutton settitle:@ "re-pat" forstate:uicontrolstatenormal]; UIButton *usebutton=[bottombarimageforsave.subviEWS Objectatindex:1]; [Usebutton settitle:@ "Save" forstate:uicontrolstatenormal]; Uiimageview *bottombarimageforcamera = [Bottombar.subviews objectatindex:1]; UIButton *cancelbutton=[bottombarimageforcamera.subviews Objectatindex:1]; [CancelButton settitle:@ "Cancel" forstate:uicontrolstatenormal];} -(void) Navigationcontroller: (Uinavigationcontroller *) Navigationcontroller Willshowviewcontroller: ( Uiviewcontroller *) Viewcontroller animated: (BOOL) animated{[self addsomeelements:viewcontroller];}
|
The text of the button that changes the Uiimagepickercontroller page in iOS is Chinese