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
d5605753
Unverified
Commit
d5605753
authored
Sep 08, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: issue-510: fixed issue where visualLayer was not initialized in TableViewCell
parent
d9c19489
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
Sources/iOS/Button.swift
+1
-2
Sources/iOS/CollectionReusableView.swift
+7
-5
Sources/iOS/CollectionViewCell.swift
+5
-4
Sources/iOS/Layer.swift
+1
-2
Sources/iOS/TableViewCell.swift
+1
-1
Sources/iOS/View.swift
+2
-3
No files found.
Sources/iOS/Button.swift
View file @
d5605753
...
...
@@ -39,7 +39,7 @@ open class Button: UIButton {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
private(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/// An Array of pulse layers.
public
private(set)
lazy
var
pulseLayers
=
[
CAShapeLayer
]()
...
...
@@ -237,7 +237,6 @@ open class Button: UIButton {
/// Prepares the visualLayer property.
internal
func
prepareVisualLayer
()
{
visualLayer
=
CAShapeLayer
()
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
layer
.
addSublayer
(
visualLayer
)
...
...
Sources/iOS/CollectionReusableView.swift
View file @
d5605753
...
...
@@ -39,16 +39,18 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
private(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/// An Array of pulse layers.
open
private(set)
lazy
var
pulseLayers
=
[
CAShapeLayer
]()
/// The opcaity value for the pulse animation.
@IBInspectable
open
var
pulseOpacity
:
CGFloat
=
0.25
@IBInspectable
open
var
pulseOpacity
:
CGFloat
=
0.25
/// The color of the pulse effect.
@IBInspectable
open
var
pulseColor
=
Color
.
grey
.
base
@IBInspectable
open
var
pulseColor
=
Color
.
grey
.
base
/// The type of PulseAnimation.
open
var
pulseAnimation
=
PulseAnimation
.
pointWithBacking
...
...
@@ -58,7 +60,8 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
property. Images should not be set to the backing layer's contents
property to avoid conflicts when using clipsToBounds.
*/
@IBInspectable
open
var
image
:
UIImage
?
{
@IBInspectable
open
var
image
:
UIImage
?
{
didSet
{
visualLayer
.
contents
=
image
?
.
cgImage
}
...
...
@@ -271,7 +274,6 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
/// Prepares the visualLayer property.
internal
func
prepareVisualLayer
()
{
visualLayer
=
CAShapeLayer
()
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
layer
.
addSublayer
(
visualLayer
)
...
...
Sources/iOS/CollectionViewCell.swift
View file @
d5605753
...
...
@@ -42,16 +42,18 @@ open class CollectionViewCell: UICollectionViewCell {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
private(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/// An Array of pulse layers.
open
private(set)
lazy
var
pulseLayers
=
[
CAShapeLayer
]()
/// The opcaity value for the pulse animation.
@IBInspectable
open
var
pulseOpacity
:
CGFloat
=
0.25
@IBInspectable
open
var
pulseOpacity
:
CGFloat
=
0.25
/// The color of the pulse effect.
@IBInspectable
open
var
pulseColor
:
UIColor
=
Color
.
grey
.
base
@IBInspectable
open
var
pulseColor
=
Color
.
grey
.
base
/// The type of PulseAnimation.
open
var
pulseAnimation
=
PulseAnimation
.
pointWithBacking
...
...
@@ -282,7 +284,6 @@ open class CollectionViewCell: UICollectionViewCell {
/// Prepares the visualLayer property.
internal
func
prepareVisualLayer
()
{
visualLayer
=
CAShapeLayer
()
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
layer
.
addSublayer
(
visualLayer
)
...
...
Sources/iOS/Layer.swift
View file @
d5605753
...
...
@@ -38,7 +38,7 @@ open class Layer: CAShapeLayer {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
private(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/**
A property that manages an image for the visualLayer's contents
...
...
@@ -165,7 +165,6 @@ open class Layer: CAShapeLayer {
/// Prepares the visualLayer property.
open
func
prepareVisualLayer
()
{
visualLayer
=
CAShapeLayer
()
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
addSublayer
(
visualLayer
)
...
...
Sources/iOS/TableViewCell.swift
View file @
d5605753
...
...
@@ -38,7 +38,7 @@ open class TableViewCell: UITableViewCell {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
internal(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/// An Array of pulse layers.
open
private(set)
lazy
var
pulseLayers
=
[
CAShapeLayer
]()
...
...
Sources/iOS/View.swift
View file @
d5605753
...
...
@@ -39,7 +39,7 @@ open class View: UIView {
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
open
private(set)
var
visualLayer
:
CAShapeLayer
!
open
private(set)
lazy
var
visualLayer
=
CAShapeLayer
()
/**
A property that manages an image for the visualLayer's contents
...
...
@@ -180,8 +180,7 @@ open class View: UIView {
/// Prepares the visualLayer property.
internal
func
prepareVisualLayer
()
{
visualLayer
=
CAShapeLayer
()
visualLayer
.
zPosition
=
0
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