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
a9b489a0
Commit
a9b489a0
authored
Nov 27, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue where MaterialLayer would break when initializing with an empty layer.
parent
55817cd7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
Source/ImageCardView.swift
+1
-1
Source/MaterialButton.swift
+1
-1
Source/MaterialLayer.swift
+7
-7
Source/MaterialView.swift
+1
-1
No files found.
Source/ImageCardView.swift
View file @
a9b489a0
...
...
@@ -548,7 +548,7 @@ public class ImageCardView : MaterialPulseView {
if
nil
==
imageLayer
{
imageLayer
=
CAShapeLayer
()
imageLayer
!.
masksToBounds
=
true
imageLayer
!.
zPosition
=
-
1
imageLayer
!.
zPosition
=
0
visualLayer
.
addSublayer
(
imageLayer
!
)
}
}
...
...
Source/MaterialButton.swift
View file @
a9b489a0
...
...
@@ -458,7 +458,7 @@ public class MaterialButton : UIButton {
// :name: prepareVisualLayer
//
internal
func
prepareVisualLayer
()
{
visualLayer
.
zPosition
=
-
1
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
layer
.
addSublayer
(
visualLayer
)
}
...
...
Source/MaterialLayer.swift
View file @
a9b489a0
...
...
@@ -187,7 +187,7 @@ public class MaterialLayer : CAShapeLayer {
shape
=
.
None
shadowDepth
=
.
None
super
.
init
(
coder
:
aDecoder
)
prepareLayer
()
prepare
Visual
Layer
()
}
/**
...
...
@@ -196,8 +196,8 @@ public class MaterialLayer : CAShapeLayer {
public
override
init
(
layer
:
AnyObject
)
{
shape
=
.
None
shadowDepth
=
.
None
super
.
init
(
layer
:
layer
)
prepareLayer
()
super
.
init
()
prepare
Visual
Layer
()
}
/**
...
...
@@ -207,7 +207,7 @@ public class MaterialLayer : CAShapeLayer {
shape
=
.
None
shadowDepth
=
.
None
super
.
init
()
prepareLayer
()
prepare
Visual
Layer
()
}
/**
...
...
@@ -269,12 +269,12 @@ public class MaterialLayer : CAShapeLayer {
}
/**
:name: prepareLayer
:name: prepare
Visual
Layer
*/
public
func
prepareLayer
()
{
public
func
prepare
Visual
Layer
()
{
// visualLayer
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
visualLayer
.
zPosition
=
-
1
addSublayer
(
visualLayer
)
}
...
...
Source/MaterialView.swift
View file @
a9b489a0
...
...
@@ -397,7 +397,7 @@ public class MaterialView : UIView {
// :name: prepareVisualLayer
//
internal
func
prepareVisualLayer
()
{
visualLayer
.
zPosition
=
-
1
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
layer
.
addSublayer
(
visualLayer
)
}
...
...
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