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
55817cd7
Commit
55817cd7
authored
Nov 24, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor updates to BasicCaptureView
parent
6802a94d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Source/BasicCaptureView.swift
+5
-2
Source/MaterialTheme.swift
+1
-1
No files found.
Source/BasicCaptureView.swift
View file @
55817cd7
...
@@ -57,7 +57,7 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
...
@@ -57,7 +57,7 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
/**
/**
:name: contentInsetsRef
:name: contentInsetsRef
*/
*/
public
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialTheme
.
basicCa
rd
View
.
contentInsetsRef
{
public
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialTheme
.
basicCa
pture
View
.
contentInsetsRef
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -122,7 +122,7 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
...
@@ -122,7 +122,7 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
if
let
v
:
MaterialButton
=
switchCamerasButton
{
if
let
v
:
MaterialButton
=
switchCamerasButton
{
addSubview
(
v
)
addSubview
(
v
)
MaterialLayout
.
alignFromBottomRight
(
self
,
child
:
v
,
bottom
:
16
,
right
:
16
)
MaterialLayout
.
alignFromBottomRight
(
self
,
child
:
v
,
bottom
:
contentInsetsRef
.
bottom
,
right
:
contentInsetsRef
.
right
)
MaterialLayout
.
size
(
self
,
child
:
v
,
width
:
switchCamerasButtonSize
.
width
,
height
:
switchCamerasButtonSize
.
height
)
MaterialLayout
.
size
(
self
,
child
:
v
,
width
:
switchCamerasButtonSize
.
width
,
height
:
switchCamerasButtonSize
.
height
)
v
.
removeTarget
(
self
,
action
:
"handleSwitchCameras"
,
forControlEvents
:
.
TouchUpInside
)
v
.
removeTarget
(
self
,
action
:
"handleSwitchCameras"
,
forControlEvents
:
.
TouchUpInside
)
v
.
addTarget
(
self
,
action
:
"handleSwitchCameras"
,
forControlEvents
:
.
TouchUpInside
)
v
.
addTarget
(
self
,
action
:
"handleSwitchCameras"
,
forControlEvents
:
.
TouchUpInside
)
...
@@ -140,6 +140,9 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
...
@@ -140,6 +140,9 @@ public class BasicCaptureView : MaterialView, CaptureSessionDelegate {
print
(
error
)
print
(
error
)
}
}
//
// :name: handleSwitchCameras
//
internal
func
handleSwitchCameras
()
{
internal
func
handleSwitchCameras
()
{
previewView
.
captureSession
.
switchCameras
()
previewView
.
captureSession
.
switchCameras
()
}
}
...
...
Source/MaterialTheme.swift
View file @
55817cd7
...
@@ -212,7 +212,7 @@ public extension MaterialTheme.basicCaptureView {
...
@@ -212,7 +212,7 @@ public extension MaterialTheme.basicCaptureView {
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
// shape
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square
2
)
public
static
var
contentInsetsRef
:
MaterialInsetsType
=
MaterialInsetsToValue
(
.
Square
3
)
// border
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
borderWidth
:
MaterialBorder
=
.
None
...
...
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