Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
22717582
Commit
22717582
authored
Jul 13, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated comments to CaptureSession
parent
17b67d99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
29 deletions
+27
-29
Sources/iOS/CapturePreview.swift
+7
-3
Sources/iOS/CaptureSession.swift
+0
-0
Sources/iOS/CaptureView.swift
+5
-5
Sources/iOS/ControlView.swift
+1
-1
Sources/iOS/Grid.swift
+2
-3
Sources/iOS/InterimSpace.swift
+1
-1
Sources/iOS/MaterialCollectionReusableView.swift
+2
-3
Sources/iOS/MaterialCollectionView.swift
+2
-3
Sources/iOS/MaterialCollectionViewCell.swift
+2
-3
Sources/iOS/MaterialCollectionViewLayout.swift
+2
-3
Sources/iOS/Menu.swift
+1
-1
Sources/iOS/NavigationBar.swift
+2
-3
No files found.
Sources/iOS/CapturePreview.swift
View file @
22717582
...
...
@@ -53,9 +53,13 @@ public class CapturePreview : MaterialView {
return
(
layer
as!
AVCaptureVideoPreviewLayer
)
.
pointForCaptureDevicePoint
(
ofInterest
:
point
)
}
/**
:name: prepareView
*/
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
when subclassing.
*/
public
override
func
prepareView
()
{
super
.
prepareView
()
preparePreviewLayer
()
...
...
Sources/iOS/CaptureSession.swift
View file @
22717582
This diff is collapsed.
Click to expand it.
Sources/iOS/CaptureView.swift
View file @
22717582
...
...
@@ -433,9 +433,9 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
*/
@objc
internal
func
handleTapToFocusGesture
(
recognizer
:
UITapGestureRecognizer
)
{
if
enableTapToFocus
&&
captureSession
.
cameraSupportsTapToFocus
{
if
enableTapToFocus
&&
captureSession
.
isFocusPointOfInterestSupported
{
let
point
:
CGPoint
=
recognizer
.
location
(
in
:
self
)
captureSession
.
focus
AtPoint
(
point
:
previewView
.
captureDevicePointOfInterestForPoint
(
point
:
point
))
captureSession
.
focus
(
point
:
previewView
.
captureDevicePointOfInterestForPoint
(
point
:
point
))
animateTapLayer
(
layer
:
focusLayer
!
,
point
:
point
)
(
delegate
as?
CaptureViewDelegate
)?
.
captureViewDidTapToFocusAtPoint
?(
captureView
:
self
,
point
:
point
)
}
...
...
@@ -447,9 +447,9 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
*/
@objc
internal
func
handleTapToExposeGesture
(
recognizer
:
UITapGestureRecognizer
)
{
if
enableTapToExpose
&&
captureSession
.
cameraSupportsTapToExpose
{
if
enableTapToExpose
&&
captureSession
.
isExposurePointOfInterestSupported
{
let
point
:
CGPoint
=
recognizer
.
location
(
in
:
self
)
captureSession
.
expose
AtPoint
(
point
:
previewView
.
captureDevicePointOfInterestForPoint
(
point
:
point
))
captureSession
.
expose
(
point
:
previewView
.
captureDevicePointOfInterestForPoint
(
point
:
point
))
animateTapLayer
(
layer
:
exposureLayer
!
,
point
:
point
)
(
delegate
as?
CaptureViewDelegate
)?
.
captureViewDidTapToExposeAtPoint
?(
captureView
:
self
,
point
:
point
)
}
...
...
@@ -462,7 +462,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
@objc
internal
func
handleTapToResetGesture
(
recognizer
:
UITapGestureRecognizer
)
{
if
enableTapToReset
{
captureSession
.
reset
FocusAndExposureModes
()
captureSession
.
reset
()
let
point
:
CGPoint
=
previewView
.
pointForCaptureDevicePointOfInterest
(
point
:
CGPoint
(
x
:
0.5
,
y
:
0.5
))
animateTapLayer
(
layer
:
resetLayer
!
,
point
:
point
)
(
delegate
as?
CaptureViewDelegate
)?
.
captureViewDidTapToResetAtPoint
?(
captureView
:
self
,
point
:
point
)
...
...
Sources/iOS/ControlView.swift
View file @
22717582
...
...
@@ -59,7 +59,7 @@ public class ControlView : MaterialView {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
Sources/iOS/Grid.swift
View file @
22717582
...
...
@@ -156,7 +156,7 @@ public class Grid {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -252,4 +252,4 @@ public extension UIView {
associateObject
(
self
,
key
:
&
GridKey
,
value
:
value
)
}
}
}
\ No newline at end of file
}
Sources/iOS/InterimSpace.swift
View file @
22717582
...
...
@@ -44,7 +44,7 @@ public enum InterimSpace {
}
/// Converts the InterimSpace enum to a CGFloat value.
public
func
i
nterimSpaceToValue
(
interimSpace
:
InterimSpace
)
->
CGFloat
{
public
func
I
nterimSpaceToValue
(
interimSpace
:
InterimSpace
)
->
CGFloat
{
switch
interimSpace
{
case
.
none
:
return
0
...
...
Sources/iOS/MaterialCollectionReusableView.swift
View file @
22717582
...
...
@@ -155,7 +155,7 @@ public class MaterialCollectionReusableView : UICollectionReusableView {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -606,4 +606,4 @@ public class MaterialCollectionReusableView : UICollectionReusableView {
}
}
}
}
\ No newline at end of file
}
Sources/iOS/MaterialCollectionView.swift
View file @
22717582
...
...
@@ -104,7 +104,7 @@ public class MaterialCollectionView : UICollectionView {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -163,4 +163,4 @@ public class MaterialCollectionView : UICollectionView {
backgroundColor
=
Color
.
clear
contentInset
=
UIEdgeInsetsZero
}
}
\ No newline at end of file
}
Sources/iOS/MaterialCollectionViewCell.swift
View file @
22717582
...
...
@@ -155,7 +155,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -605,4 +605,4 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
}
}
}
}
\ No newline at end of file
}
Sources/iOS/MaterialCollectionViewLayout.swift
View file @
22717582
...
...
@@ -62,7 +62,7 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -159,4 +159,4 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
contentSize
=
CGSizeMake
(
offset
.
x
,
collectionView
!.
bounds
.
height
)
}
}
}
\ No newline at end of file
}
Sources/iOS/Menu.swift
View file @
22717582
...
...
@@ -51,7 +51,7 @@ public class Menu {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
Sources/iOS/NavigationBar.swift
View file @
22717582
...
...
@@ -78,7 +78,7 @@ public class NavigationBar : UINavigationBar {
/// A preset wrapper around interimSpace.
public
var
interimSpacePreset
:
InterimSpace
=
.
none
{
didSet
{
interimSpace
=
i
nterimSpaceToValue
(
interimSpacePreset
)
interimSpace
=
I
nterimSpaceToValue
(
interimSpacePreset
)
}
}
...
...
@@ -475,4 +475,4 @@ public class NavigationBar : UINavigationBar {
item
.
contentView
!.
grid
.
axis
.
direction
=
.
Vertical
return
item
.
contentView
!
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment