Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
omergul committed May 24, 2015
1 parent f551b93 commit c4d019d
Showing 1 changed file with 63 additions and 35 deletions.
98 changes: 63 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,41 @@
# LLSimpleCamera: A simple customizable camera control
# LLSimpleCamera: A simple customizable camera - video recorder control

![Screenshot](https://raw.githubusercontent.com/omergul123/LLSimpleCamera/master/screenshot.png)

LLSimpleCamera is a library for creating a customized camera screens similar to snapchat's. You don't have to present the camera in a new view controller.
LLSimpleCamera is a library for creating a customized camera - video recorder screens similar to snapchat's. You don't have to present the camera in a new view controller.

###LLSimpleCamera:###
* lets you easily capture photos
* lets you easily capture photos and record videos (finally)
* handles the position and flash of the camera
* hides the nitty gritty details from the developer
* doesn't have to be presented in a new modal view controller, simply can be embedded inside any of your VCs. (like Snapchat)

#### Version 2.2.0
- camera permissions are supported, if the permission is not given by the user, onError will be triggered.
- camera flash methods are altered. Now you have to call **- (BOOL)updateFlashMode:(CameraFlash)cameraFlash;**
- cameraFlash and cameraPosition property names are simplified to: **flash** and **position**.
- added support for device orientation in case your vc orientation is locked but you want to use the device orientation no matter what.

#### Version 2.1.1
- freezing the screen just after the photo is taken for better user experience.

#### Version 2.1.0
- added an extra parameter exactSeenImage:(BOOL)exactSeenImage to -capture method to easily get the exact seen image on the screen instead of the raw uncropped image. The default value is NO.
- fixed an orientation bug inside capture method.

#### Version 2.0.0
Some significant changes have been made at both internal structure and api.
- added tap to focus feature (it is fully customizable, if you don't like the default layer and animation)
- removed delegates and added blocks
- interface is significantly improved

#### Version 1.1.1
- fixed a potential crash scenario if -stop() is called multiple times

#### Version 1.1.0
- fixed a problem that sometimes caused a crash after capturing a photo.
- improved code structure, didChangeDevice delegate is now also triggered for the first default device.

## Install

pod 'LLSimpleCamera', '~> 2.2'
pod 'LLSimpleCamera', '~> 3.0'

## Example usage

Initialize the LLSimpleCamera
````
CGRect screenRect = [[UIScreen mainScreen] bounds];
// create camera vc
self.camera = [[LLSimpleCamera alloc] initWithQuality:CameraQualityPhoto andPosition:CameraPositionBack];
// create camera with standard settings
self.camera = [[LLSimpleCamera alloc] init];
// camera with video recording capability
self.camera = [[LLSimpleCamera alloc] nitWithVideoEnabled:YES];
// camera with precise quality, position and video parameters.
self.camera = [[LLSimpleCamera alloc] initWithQuality:AVCaptureSessionPresetHigh
position:CameraPositionBack
videoEnabled:YES];
// attach to the view
[self.camera attachToViewController:self withFrame:CGRectMake(0, 0, screenRect.size.width, screenRect.size.height)];
````

To capture a photo:

````
// capture
[self.camera capture:^(LLSimpleCamera *camera, UIImage *image, NSDictionary *metadata, NSError *error) {
Expand All @@ -70,6 +51,22 @@ To capture a photo:
}];
````

To start recording a video:
````
// start recording
NSURL *outputURL = [[[self applicationDocumentsDirectory]
URLByAppendingPathComponent:@"test1"] URLByAppendingPathExtension:@"mov"];
[self.camera startRecordingWithOutputUrl:outputURL];
````

To stop recording the video:
````
[self.camera stopRecording:^(LLSimpleCamera *camera, NSURL *outputFileUrl, NSError *error) {
VideoViewController *vc = [[VideoViewController alloc] initWithVideoUrl:outputFileUrl];
[self.navigationController pushViewController:vc animated:YES];
}];
````

Changing the focus layer and animation:
````
- (void)alterFocusBox:(CALayer *)layer animation:(CAAnimation *)animation;
Expand All @@ -87,8 +84,39 @@ You should never forget to stop the camera either after the capture block is tri

Ömer Faruk Gül

[My LinkedIn Account][2]
[Personal Site][2]
omer@omerfarukgul.com

[2]: http://omerfarukgul.com

## Version History ##

#### Version 2.2.0
- camera permissions are supported, if the permission is not given by the user, onError will be triggered.
- camera flash methods are altered. Now you have to call **- (BOOL)updateFlashMode:(CameraFlash)cameraFlash;**
- cameraFlash and cameraPosition property names are simplified to: **flash** and **position**.
- added support for device orientation in case your vc orientation is locked but you want to use the device orientation no matter what.

#### Version 2.1.1
- freezing the screen just after the photo is taken for better user experience.

#### Version 2.1.0
- added an extra parameter exactSeenImage:(BOOL)exactSeenImage to -capture method to easily get the exact seen image on the screen instead of the raw uncropped image. The default value is NO.
- fixed an orientation bug inside capture method.

#### Version 2.0.0
Some significant changes have been made at both internal structure and api.
- added tap to focus feature (it is fully customizable, if you don't like the default layer and animation)
- removed delegates and added blocks
- interface is significantly improved

#### Version 1.1.1
- fixed a potential crash scenario if -stop() is called multiple times

#### Version 1.1.0
- fixed a problem that sometimes caused a crash after capturing a photo.
- improved code structure, didChangeDevice delegate is now also triggered for the first default device.


[2]: http://www.linkedin.com/profile/view?id=44437676


0 comments on commit c4d019d

Please sign in to comment.