I want to use the UIImagePickerController to bring up the camera but I do not want to actually take pictures. I would like to remove the subviews so the "Take Picture", "Cancel" and "Photo" buttons do not appear.
I have tried code like the following
but none of this works. The app still runs and shows the default messages.
How can I remove these subviews from the camera view?
Thanks
I have tried code like the following
Code:
- (UIView*)findCamControlsLayerView:(UIView*)view {
Class cl = [view class];
NSString *desc = [cl description];
if ([desc compare:@"PLCropOverlay"] == NSOrderedSame)
return view;
for (NSUInteger i = 0; i < [view.subviews count]; i++)
{
UIView *subView = [view.subviews objectAtIndex:i];
subView = [self findCamControlsLayerView:subView];
if (subView)
return subView;
}
return nil;
}
************************************************************
..... Inside another method.......
{
UIView *cameraView = [self findCamControlsLayerView:self.view];
if (cameraView)
{
cameraView = cameraView.superview;
int cnt = [cameraView.subviews count];
if (cnt >= 4)
{
for (int i = 2; i < cnt - 1; i++)
{
UIView *v = [cameraView.subviews objectAtIndex:i];
v.hidden = YES;
}
}
}
************************************************************
but none of this works. The app still runs and shows the default messages.
How can I remove these subviews from the camera view?
Thanks