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
159165b9
Unverified
Commit
159165b9
authored
Sep 06, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added a Divider object to a CollectionViewCell
parent
53a2c6ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
Sources/iOS/CollectionView.swift
+1
-1
Sources/iOS/CollectionViewCell.swift
+9
-0
No files found.
Sources/iOS/CollectionView.swift
View file @
159165b9
...
@@ -121,6 +121,6 @@ open class CollectionView: UICollectionView {
...
@@ -121,6 +121,6 @@ open class CollectionView: UICollectionView {
open
func
prepareView
()
{
open
func
prepareView
()
{
contentScaleFactor
=
Device
.
scale
contentScaleFactor
=
Device
.
scale
backgroundColor
=
Color
.
clear
backgroundColor
=
Color
.
clear
contentInset
=
UIEdgeInsets
.
zero
contentInset
=
.
zero
}
}
}
}
Sources/iOS/CollectionViewCell.swift
View file @
159165b9
...
@@ -33,6 +33,9 @@ import UIKit
...
@@ -33,6 +33,9 @@ import UIKit
@IBDesignable
@IBDesignable
@objc(CollectionViewCell)
@objc(CollectionViewCell)
open
class
CollectionViewCell
:
UICollectionViewCell
{
open
class
CollectionViewCell
:
UICollectionViewCell
{
/// A reference to the divider.
open
internal(set)
var
divider
:
Divider
!
/**
/**
A CAShapeLayer used to manage elements that would be affected by
A CAShapeLayer used to manage elements that would be affected by
the clipToBounds property of the backing layer. For example, this
the clipToBounds property of the backing layer. For example, this
...
@@ -274,6 +277,7 @@ open class CollectionViewCell: UICollectionViewCell {
...
@@ -274,6 +277,7 @@ open class CollectionViewCell: UICollectionViewCell {
open
func
prepareView
()
{
open
func
prepareView
()
{
contentScaleFactor
=
Device
.
scale
contentScaleFactor
=
Device
.
scale
prepareVisualLayer
()
prepareVisualLayer
()
prepareDivider
()
}
}
/// Prepares the visualLayer property.
/// Prepares the visualLayer property.
...
@@ -289,4 +293,9 @@ open class CollectionViewCell: UICollectionViewCell {
...
@@ -289,4 +293,9 @@ open class CollectionViewCell: UICollectionViewCell {
visualLayer
.
frame
=
bounds
visualLayer
.
frame
=
bounds
visualLayer
.
cornerRadius
=
cornerRadius
visualLayer
.
cornerRadius
=
cornerRadius
}
}
/// Prepares the divider.
private
func
prepareDivider
()
{
divider
=
Divider
(
view
:
self
)
}
}
}
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