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
5a6f1b28
Unverified
Commit
5a6f1b28
authored
Jun 27, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
master: fixed the shapePreset issue where it was not updating correctly
parent
6bfd58cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Sources/iOS/Material+CALayer.swift
+7
-2
No files found.
Sources/iOS/Material+CALayer.swift
View file @
5a6f1b28
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
import
UIKit
import
UIKit
fileprivate
struct
MaterialLayer
{
fileprivate
class
MaterialLayer
{
/// A reference to the CALayer.
/// A reference to the CALayer.
fileprivate
weak
var
layer
:
CALayer
?
fileprivate
weak
var
layer
:
CALayer
?
...
@@ -56,7 +56,11 @@ fileprivate struct MaterialLayer {
...
@@ -56,7 +56,11 @@ fileprivate struct MaterialLayer {
}
}
/// A preset property to set the shape.
/// A preset property to set the shape.
fileprivate
var
shapePreset
=
ShapePreset
.
none
fileprivate
var
shapePreset
=
ShapePreset
.
none
{
didSet
{
layer
?
.
layoutShape
()
}
}
/// A preset value for Depth.
/// A preset value for Depth.
fileprivate
var
depthPreset
:
DepthPreset
{
fileprivate
var
depthPreset
:
DepthPreset
{
...
@@ -263,6 +267,7 @@ extension CALayer {
...
@@ -263,6 +267,7 @@ extension CALayer {
}
}
guard
.
circle
==
shapePreset
else
{
guard
.
circle
==
shapePreset
else
{
cornerRadius
=
0
return
return
}
}
...
...
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