Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)takePicure
- UIImagePickerController *picker = [[UIImagePickerController alloc] init];
- picker.sourceType = UIImagePickerControllerSourceTypeCamera;
- picker.showsCameraControls = NO;
- UIView *cameraControlsView = [[UIView alloc] initWithFrame:controlsFrame];
- UIButton *captureButton = [[UIButton alloc] initWithFrame:buttonFrame];
- [captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [captureButton addTarget:self action:@selector(buttonPressed:)
- forControlEvents:UIControlEventTouchUpInside];
- [cameraControlsView addSubview:captureButton];
- picker.cameraOverlayView = cameraControlsView;
- - (void)buttonPressed:(id)sender {
- [NSTimer scheduledTimerWithTimeInterval:3.0f target:self
- selector:@selector(timerFired:) userInfo:nil repeats:NO];
- }
- - (void)timerFired:(NSTimer *)timer {
- if (whateverIsOk) {
- [self.picker takePicture];
- )
- }
Add Comment
Please, Sign In to add comment