3 Star 0 Fork 0

Gitee 极速下载 / skf-camera

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/wubianxiaoxian/SKFCamera
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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.

The MIT License (MIT) Copyright (c) 2015 wubianxiaoxian Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Objective-C 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/skf-camera.git
git@gitee.com:mirrors/skf-camera.git
mirrors
skf-camera
skf-camera
master

搜索帮助