ios - Using .xib file as the custom camera overlayview -
i created cameraoverlayviewcontroller .xib file implement customized camera overlayview with. overlayview transparent background button select photo photolibrary , loads in mainviewcontroller following code:
cameraoverlayviewcontroller* overlay = [[cameraoverlayviewcontroller alloc] initwithnibname:@"cameraoverlayviewcontroller" bundle:nil]; camerapicker.cameraoverlayview = overlay.view;
however, nothing happens when pressed button on cameraoverlayview. no error messages, nothing. know what's going on here? below code in cameraoverlayviewcontroller file:
- (ibaction)select:(uibutton *)sender { uiimagepickercontroller *picker = [[uiimagepickercontroller alloc] init]; [self dismissviewcontrolleranimated:yes completion:^{ [self presentviewcontroller:picker animated:yes completion:nil]; }]; picker.delegate = self; picker.allowsediting = yes; picker.sourcetype = uiimagepickercontrollersourcetypephotolibrary; [self presentviewcontroller:picker animated:yes completion:null]; nslog(@"just work alrdy!!!"); }
thanks in advance!
try this..
-(ibaction)select:(uibutton *)sender { uiimagepickercontroller *picker = [[uiimagepickercontroller alloc] init]; picker.delegate = self; picker.allowsediting = yes; picker.sourcetype = uiimagepickercontrollersourcetypephotolibrary; [self dismissviewcontrolleranimated:yes completion:^{ [self presentviewcontroller:picker animated:yes completion:nil]; ////////check called?????? }]; }
Comments
Post a Comment