Gold Challenge


#1

I don’t think i’m using the CameraOverlayView correctly…but this is what i did.

If there was a downside of using this method, I guess it would be resource waste as I am creating two additional views?

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
    {
      
        [imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
        
        int xCenter, yCenter;
        xCenter = (CGRectGetWidth(imagePicker.cameraOverlayView.frame) /2);
        yCenter = (CGRectGetHeight(imagePicker.cameraOverlayView.frame) /2);
    
        //draw horizonal line
        UIView *horLineView = [[UIView alloc] initWithFrame:CGRectMake(xCenter-25, yCenter, 50, 1)];
        horLineView.backgroundColor = [UIColor blackColor];
        [imagePicker.view addSubview:horLineView];
        
        //draw vertical line 
        UIView *verLineView = [[UIView alloc] initWithFrame:CGRectMake(xCenter, yCenter-25, 1, 50)];
        verLineView.backgroundColor = [UIColor blackColor];
        [imagePicker.view addSubview:verLineView];
 
        
    }
    else...