The text of the button that changes the Uiimagepickercontroller page in iOS is Chinese

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.