You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
Writing a ground-up solution for taking profile pictures in iOS can be a pain and time consuming. AvatarCapture is a Swift based library inspired by [ZCSAvatarCapture](https://github.com/zshannon/ZCSAvatarCapture) whose purpose is to make it as easy as possible to start your camera(front facing or rear), allow you to snap a photo or choose a photo from your Photos library.
3
3
4
4
## Installation
5
-
Note: AvatarCapture has a minimum deployment target of iOS 11
5
+
Note: AvatarCapture has a minimum deployment target of iOS 10
6
6
7
7
Edit your PodFile:
8
-
`pod 'AvatarCapture', '1.0.5'`
8
+
`pod 'AvatarCapture'`
9
9
10
10
Then run `pod install`
11
11
@@ -16,7 +16,6 @@ Then run `pod install`
16
16
- Choose a photo from the iPhone library
17
17
18
18
## Plans
19
-
- general code improvements
20
19
- allow more flexibility in where buttons are positioned
21
20
- add custom elements/subviews
22
21
- Change/choose shape of avatar profile
@@ -36,6 +35,12 @@ First, initialize the view controller(anywhere but `viewDidLoad` is common):
36
35
37
36
In this example, `avatarView` is a UIView defined in a storyboard. Whatever the `width` and `height` of this UIView is will determine the dimensions of the avatar.
38
37
38
+
## Helper Methods
39
+
`startCapture()` - Begins capturing the output from your iPhone camera and displays the on screen buttons to interact with your camera
40
+
`endCapture()` - Stops the live preview of the iPhone camera. This method does not need to be explicitly called in most situations
41
+
`swapCameras()` - Swaps the live preview from the front to rear camera and vice versa. This method does not need to be explicitly called in most situations.
42
+
`showImagePicker()` - Displays the Photos library for choosing an image
43
+
39
44
## How do I get my image?
40
45
Once you've subscribed to the `AvatarCaptureControllerDelegate` protocol, you can be notified when an image was selected and when the image selection was cancelled:
0 commit comments