Skip to content
프로젝트

소개

A custom camera that allows for free cropping of photos upon completion.

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

PureCamera

CI Status Version License Platform

A custom camera that allows for free cropping of photos upon completion

Requirements

  • Xcode 8 or higher
  • iOS 8.0 or higher
  • ARC

Version

  • 1.6.3

Usage

  • Installation with CocoaPods: pod 'PureCamera', import
#import <PureCamera.h>  
  • Or download the demo locally and add PureCamera to your project, import
#import "PureCamera.h"
  • Add the following to info.plist
Privacy - Camera Usage Description      Use camera
  • Use the following method to call the camera
PureCamera *homec=[[PureCamera alloc]init];
__weak typeof(self)myself=self;
homec.fininshcapture=^(UIImage *ss){
    if (ss) {
        NSLog(@"Photo exists");
        //Here you can get the cropped photo
        myself.ViewImageview.image=ss;
    }
} ;
[self presentViewController:homec animated:NO completion:^{}];}
  • Use the following method to call the image cropping page
First import #import "TOCropViewController.h"
Adhere to @interface ViewController()<TOCropViewControllerDelegate>
Pass in an image and you can present the image cropping page

TOCropViewController *cropController = [[TOCropViewController alloc] initWithImage:self.cropImageview.image];
cropController.delegate = self;
[self presentViewController:cropController animated:YES completion:nil];

- (void)cropViewController:(TOCropViewController *)cropViewController didCropToImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle
{
   self.cropImageview.image=image;
   self.navigationItem.rightBarButtonItem.enabled = YES;
   //The following defines an animation effect, which is that when the image cropping page disappears, it will use the frame of the view you defined as the boundary after the disappearance.
   CGRect viewFrame = [self.view convertRect:self.cropImageview.frame toView:self.navigationController.view];
   [cropViewController dismissAnimatedFromParentViewController:self withCroppedImage:image toFrame:viewFrame completion:^{
   }];
}

skfcamera相机录制gifnew.gif

If you encounter any problems during use, please feel free to submit an issue.

관련 프로젝트 살펴보기

불러오는 중…