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
777f4942
Unverified
Commit
777f4942
authored
Apr 06, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated Pulse internal API
parent
a861a90b
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
93 additions
and
57 deletions
+93
-57
Sources/iOS/Bar.swift
+8
-4
Sources/iOS/Button.swift
+2
-2
Sources/iOS/Card.swift
+12
-6
Sources/iOS/CollectionReusableView.swift
+2
-2
Sources/iOS/CollectionViewCell.swift
+2
-2
Sources/iOS/ErrorTextField.swift
+2
-1
Sources/iOS/FABMenu.swift
+4
-2
Sources/iOS/ImageCard.swift
+8
-4
Sources/iOS/NavigationBar.swift
+6
-3
Sources/iOS/NavigationItem.swift
+8
-4
Sources/iOS/PresenterCard.swift
+4
-2
Sources/iOS/PulseAnimation.swift
+11
-11
Sources/iOS/PulseView.swift
+2
-2
Sources/iOS/Snackbar.swift
+2
-1
Sources/iOS/TabBar.swift
+4
-2
Sources/iOS/TableViewCell.swift
+2
-2
Sources/iOS/TextField.swift
+10
-5
Sources/iOS/Toolbar.swift
+4
-2
No files found.
Sources/iOS/Bar.swift
View file @
777f4942
...
@@ -49,7 +49,8 @@ open class Bar: View {
...
@@ -49,7 +49,8 @@ open class Bar: View {
/// Should center the contentView.
/// Should center the contentView.
open
var
contentViewAlignment
=
ContentViewAlignment
.
full
{
open
var
contentViewAlignment
=
ContentViewAlignment
.
full
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -100,7 +101,8 @@ open class Bar: View {
...
@@ -100,7 +101,8 @@ open class Bar: View {
open
var
gridFactor
:
CGFloat
=
12
{
open
var
gridFactor
:
CGFloat
=
12
{
didSet
{
didSet
{
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -113,7 +115,8 @@ open class Bar: View {
...
@@ -113,7 +115,8 @@ open class Bar: View {
for
v
in
oldValue
{
for
v
in
oldValue
{
v
.
removeFromSuperview
()
v
.
removeFromSuperview
()
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -123,7 +126,8 @@ open class Bar: View {
...
@@ -123,7 +126,8 @@ open class Bar: View {
for
v
in
oldValue
{
for
v
in
oldValue
{
v
.
removeFromSuperview
()
v
.
removeFromSuperview
()
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/Button.swift
View file @
777f4942
...
@@ -44,7 +44,7 @@ open class Button: UIButton, Pulseable, PulseableLayer {
...
@@ -44,7 +44,7 @@ open class Button: UIButton, Pulseable, PulseableLayer {
/// A reference to the pulse layer.
/// A reference to the pulse layer.
internal
var
pulseLayer
:
CALayer
?
{
internal
var
pulseLayer
:
CALayer
?
{
return
pulse
.
pulseL
ayer
return
pulse
.
l
ayer
}
}
/// PulseAnimation value.
/// PulseAnimation value.
...
@@ -263,7 +263,7 @@ extension Button {
...
@@ -263,7 +263,7 @@ extension Button {
/// Prepares the pulse motion.
/// Prepares the pulse motion.
fileprivate
func
preparePulse
()
{
fileprivate
func
preparePulse
()
{
pulse
=
Pulse
(
pulseView
:
self
,
pulseL
ayer
:
visualLayer
)
pulse
=
Pulse
(
view
:
self
,
l
ayer
:
visualLayer
)
}
}
/**
/**
...
...
Sources/iOS/Card.swift
View file @
777f4942
...
@@ -69,7 +69,8 @@ open class Card: PulseView {
...
@@ -69,7 +69,8 @@ open class Card: PulseView {
if
let
v
=
toolbar
{
if
let
v
=
toolbar
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -84,7 +85,8 @@ open class Card: PulseView {
...
@@ -84,7 +85,8 @@ open class Card: PulseView {
@IBInspectable
@IBInspectable
open
var
toolbarEdgeInsets
=
EdgeInsets
.
zero
{
open
var
toolbarEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -97,7 +99,8 @@ open class Card: PulseView {
...
@@ -97,7 +99,8 @@ open class Card: PulseView {
v
.
clipsToBounds
=
true
v
.
clipsToBounds
=
true
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -112,7 +115,8 @@ open class Card: PulseView {
...
@@ -112,7 +115,8 @@ open class Card: PulseView {
@IBInspectable
@IBInspectable
open
var
contentViewEdgeInsets
=
EdgeInsets
.
zero
{
open
var
contentViewEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -124,7 +128,8 @@ open class Card: PulseView {
...
@@ -124,7 +128,8 @@ open class Card: PulseView {
if
let
v
=
bottomBar
{
if
let
v
=
bottomBar
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -139,7 +144,8 @@ open class Card: PulseView {
...
@@ -139,7 +144,8 @@ open class Card: PulseView {
@IBInspectable
@IBInspectable
open
var
bottomBarEdgeInsets
=
EdgeInsets
.
zero
{
open
var
bottomBarEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/CollectionReusableView.swift
View file @
777f4942
...
@@ -45,7 +45,7 @@ open class CollectionReusableView: UICollectionReusableView, Pulseable, Pulseabl
...
@@ -45,7 +45,7 @@ open class CollectionReusableView: UICollectionReusableView, Pulseable, Pulseabl
/// A reference to the pulse layer.
/// A reference to the pulse layer.
internal
var
pulseLayer
:
CALayer
?
{
internal
var
pulseLayer
:
CALayer
?
{
return
pulse
.
pulseL
ayer
return
pulse
.
l
ayer
}
}
/// PulseAnimation value.
/// PulseAnimation value.
...
@@ -301,7 +301,7 @@ open class CollectionReusableView: UICollectionReusableView, Pulseable, Pulseabl
...
@@ -301,7 +301,7 @@ open class CollectionReusableView: UICollectionReusableView, Pulseable, Pulseabl
extension
CollectionReusableView
{
extension
CollectionReusableView
{
/// Prepares the pulse motion.
/// Prepares the pulse motion.
fileprivate
func
preparePulse
()
{
fileprivate
func
preparePulse
()
{
pulse
=
Pulse
(
pulseView
:
self
,
pulseL
ayer
:
visualLayer
)
pulse
=
Pulse
(
view
:
self
,
l
ayer
:
visualLayer
)
pulseAnimation
=
.
none
pulseAnimation
=
.
none
}
}
...
...
Sources/iOS/CollectionViewCell.swift
View file @
777f4942
...
@@ -45,7 +45,7 @@ open class CollectionViewCell: UICollectionViewCell, Pulseable, PulseableLayer {
...
@@ -45,7 +45,7 @@ open class CollectionViewCell: UICollectionViewCell, Pulseable, PulseableLayer {
/// A reference to the pulse layer.
/// A reference to the pulse layer.
internal
var
pulseLayer
:
CALayer
?
{
internal
var
pulseLayer
:
CALayer
?
{
return
pulse
.
pulseL
ayer
return
pulse
.
l
ayer
}
}
/// PulseAnimation value.
/// PulseAnimation value.
...
@@ -259,7 +259,7 @@ open class CollectionViewCell: UICollectionViewCell, Pulseable, PulseableLayer {
...
@@ -259,7 +259,7 @@ open class CollectionViewCell: UICollectionViewCell, Pulseable, PulseableLayer {
extension
CollectionViewCell
{
extension
CollectionViewCell
{
/// Prepares the pulse motion.
/// Prepares the pulse motion.
fileprivate
func
preparePulse
()
{
fileprivate
func
preparePulse
()
{
pulse
=
Pulse
(
pulseView
:
self
,
pulseL
ayer
:
visualLayer
)
pulse
=
Pulse
(
view
:
self
,
l
ayer
:
visualLayer
)
}
}
/// Prepares the visualLayer property.
/// Prepares the visualLayer property.
...
...
Sources/iOS/ErrorTextField.swift
View file @
777f4942
...
@@ -36,7 +36,8 @@ open class ErrorTextField: TextField {
...
@@ -36,7 +36,8 @@ open class ErrorTextField: TextField {
open
var
isErrorRevealed
=
false
{
open
var
isErrorRevealed
=
false
{
didSet
{
didSet
{
detailLabel
.
isHidden
=
!
isErrorRevealed
detailLabel
.
isHidden
=
!
isErrorRevealed
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/FABMenu.swift
View file @
777f4942
...
@@ -67,7 +67,8 @@ open class FABMenuItem: View {
...
@@ -67,7 +67,8 @@ open class FABMenuItem: View {
}
}
set
(
value
)
{
set
(
value
)
{
titleLabel
.
text
=
value
titleLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -200,7 +201,8 @@ open class FABMenu: View {
...
@@ -200,7 +201,8 @@ open class FABMenu: View {
spring
.
springDirection
=
.
right
spring
.
springDirection
=
.
right
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/ImageCard.swift
View file @
777f4942
...
@@ -44,7 +44,8 @@ open class ImageCard: Card {
...
@@ -44,7 +44,8 @@ open class ImageCard: Card {
*/
*/
open
var
imageViewDisplay
=
Display
.
partial
{
open
var
imageViewDisplay
=
Display
.
partial
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -59,7 +60,8 @@ open class ImageCard: Card {
...
@@ -59,7 +60,8 @@ open class ImageCard: Card {
@IBInspectable
@IBInspectable
open
var
imageViewEdgeInsets
=
EdgeInsets
.
zero
{
open
var
imageViewEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -71,14 +73,16 @@ open class ImageCard: Card {
...
@@ -71,14 +73,16 @@ open class ImageCard: Card {
if
let
v
=
imageView
{
if
let
v
=
imageView
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
/// An ImageCardToolbarAlignment value.
/// An ImageCardToolbarAlignment value.
open
var
toolbarAlignment
=
ToolbarAlignment
.
bottom
{
open
var
toolbarAlignment
=
ToolbarAlignment
.
bottom
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/NavigationBar.swift
View file @
777f4942
...
@@ -51,7 +51,8 @@ open class NavigationBar: UINavigationBar {
...
@@ -51,7 +51,8 @@ open class NavigationBar: UINavigationBar {
@IBInspectable
@IBInspectable
open
var
contentEdgeInsets
=
EdgeInsets
.
zero
{
open
var
contentEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -66,7 +67,8 @@ open class NavigationBar: UINavigationBar {
...
@@ -66,7 +67,8 @@ open class NavigationBar: UINavigationBar {
@IBInspectable
@IBInspectable
open
var
interimSpace
:
InterimSpace
=
0
{
open
var
interimSpace
:
InterimSpace
=
0
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -75,7 +77,8 @@ open class NavigationBar: UINavigationBar {
...
@@ -75,7 +77,8 @@ open class NavigationBar: UINavigationBar {
open
var
gridFactor
:
CGFloat
=
12
{
open
var
gridFactor
:
CGFloat
=
12
{
didSet
{
didSet
{
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/NavigationItem.swift
View file @
777f4942
...
@@ -38,7 +38,8 @@ public class NavigationItem: NSObject {
...
@@ -38,7 +38,8 @@ public class NavigationItem: NSObject {
/// Should center the contentView.
/// Should center the contentView.
open
var
contentViewAlignment
=
ContentViewAlignment
.
center
{
open
var
contentViewAlignment
=
ContentViewAlignment
.
center
{
didSet
{
didSet
{
navigationBar
?
.
layoutSubviews
()
navigationBar
?
.
setNeedsLayout
()
navigationBar
?
.
layoutIfNeeded
()
}
}
}
}
...
@@ -60,7 +61,8 @@ public class NavigationItem: NSObject {
...
@@ -60,7 +61,8 @@ public class NavigationItem: NSObject {
for
v
in
oldValue
{
for
v
in
oldValue
{
v
.
removeFromSuperview
()
v
.
removeFromSuperview
()
}
}
navigationBar
?
.
layoutSubviews
()
navigationBar
?
.
setNeedsLayout
()
navigationBar
?
.
layoutIfNeeded
()
}
}
}
}
...
@@ -70,7 +72,8 @@ public class NavigationItem: NSObject {
...
@@ -70,7 +72,8 @@ public class NavigationItem: NSObject {
for
v
in
oldValue
{
for
v
in
oldValue
{
v
.
removeFromSuperview
()
v
.
removeFromSuperview
()
}
}
navigationBar
?
.
layoutSubviews
()
navigationBar
?
.
setNeedsLayout
()
navigationBar
?
.
layoutIfNeeded
()
}
}
}
}
...
@@ -109,7 +112,8 @@ public class NavigationItem: NSObject {
...
@@ -109,7 +112,8 @@ public class NavigationItem: NSObject {
/// Reloads the subviews for the NavigationBar.
/// Reloads the subviews for the NavigationBar.
internal
func
reload
()
{
internal
func
reload
()
{
navigationBar
?
.
layoutSubviews
()
navigationBar
?
.
setNeedsLayout
()
navigationBar
?
.
layoutIfNeeded
()
}
}
/// Prepares the titleLabel.
/// Prepares the titleLabel.
...
...
Sources/iOS/PresenterCard.swift
View file @
777f4942
...
@@ -42,7 +42,8 @@ open class PresenterCard: Card {
...
@@ -42,7 +42,8 @@ open class PresenterCard: Card {
@IBInspectable
@IBInspectable
open
var
presenterViewEdgeInsets
=
EdgeInsets
.
zero
{
open
var
presenterViewEdgeInsets
=
EdgeInsets
.
zero
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -55,7 +56,8 @@ open class PresenterCard: Card {
...
@@ -55,7 +56,8 @@ open class PresenterCard: Card {
v
.
clipsToBounds
=
true
v
.
clipsToBounds
=
true
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/PulseAnimation.swift
View file @
777f4942
...
@@ -60,10 +60,10 @@ internal protocol PulseableLayer {
...
@@ -60,10 +60,10 @@ internal protocol PulseableLayer {
public
struct
Pulse
{
public
struct
Pulse
{
/// A UIView that is Pulseable.
/// A UIView that is Pulseable.
fileprivate
weak
var
pulseV
iew
:
UIView
?
fileprivate
weak
var
v
iew
:
UIView
?
/// The layer the pulse layers are added to.
/// The layer the pulse layers are added to.
internal
weak
var
pulseL
ayer
:
CALayer
?
internal
weak
var
l
ayer
:
CALayer
?
/// Pulse layers.
/// Pulse layers.
fileprivate
var
layers
=
[
CAShapeLayer
]()
fileprivate
var
layers
=
[
CAShapeLayer
]()
...
@@ -79,12 +79,12 @@ public struct Pulse {
...
@@ -79,12 +79,12 @@ public struct Pulse {
/**
/**
An initializer that takes a given view and pulse layer.
An initializer that takes a given view and pulse layer.
- Parameter
pulseV
iew: An optional UIView.
- Parameter
v
iew: An optional UIView.
- Parameter
pulseL
ayer: An optional CALayer.
- Parameter
l
ayer: An optional CALayer.
*/
*/
internal
init
(
pulseView
:
UIView
?,
pulseL
ayer
:
CALayer
?)
{
internal
init
(
view
:
UIView
?,
l
ayer
:
CALayer
?)
{
self
.
pulseView
=
pulseV
iew
self
.
view
=
v
iew
self
.
pulseLayer
=
pulseL
ayer
self
.
layer
=
l
ayer
}
}
/**
/**
...
@@ -92,11 +92,11 @@ public struct Pulse {
...
@@ -92,11 +92,11 @@ public struct Pulse {
- Parameter point: A point to pulse from.
- Parameter point: A point to pulse from.
*/
*/
public
mutating
func
expand
(
point
:
CGPoint
)
{
public
mutating
func
expand
(
point
:
CGPoint
)
{
guard
let
v
iew
=
pulseV
iew
else
{
guard
let
v
=
v
iew
else
{
return
return
}
}
guard
let
layer
=
pulseL
ayer
else
{
guard
let
layer
=
l
ayer
else
{
return
return
}
}
...
@@ -116,8 +116,8 @@ public struct Pulse {
...
@@ -116,8 +116,8 @@ public struct Pulse {
layer
.
masksToBounds
=
!
(
.
centerRadialBeyondBounds
==
animation
||
.
radialBeyondBounds
==
animation
)
layer
.
masksToBounds
=
!
(
.
centerRadialBeyondBounds
==
animation
||
.
radialBeyondBounds
==
animation
)
let
w
=
v
iew
.
bounds
.
width
let
w
=
v
.
bounds
.
width
let
h
=
v
iew
.
bounds
.
height
let
h
=
v
.
bounds
.
height
Motion
.
disable
({
[
Motion
.
disable
({
[
n
=
.
center
==
animation
?
w
<
h
?
w
:
h
:
w
<
h
?
h
:
w
,
n
=
.
center
==
animation
?
w
<
h
?
w
:
h
:
w
<
h
?
h
:
w
,
...
...
Sources/iOS/PulseView.swift
View file @
777f4942
...
@@ -36,7 +36,7 @@ open class PulseView: View, Pulseable, PulseableLayer {
...
@@ -36,7 +36,7 @@ open class PulseView: View, Pulseable, PulseableLayer {
/// A reference to the pulse layer.
/// A reference to the pulse layer.
internal
var
pulseLayer
:
CALayer
?
{
internal
var
pulseLayer
:
CALayer
?
{
return
pulse
.
pulseL
ayer
return
pulse
.
l
ayer
}
}
/// PulseAnimation value.
/// PulseAnimation value.
...
@@ -132,6 +132,6 @@ open class PulseView: View, Pulseable, PulseableLayer {
...
@@ -132,6 +132,6 @@ open class PulseView: View, Pulseable, PulseableLayer {
extension
PulseView
{
extension
PulseView
{
/// Prepares the pulse motion.
/// Prepares the pulse motion.
fileprivate
func
preparePulse
()
{
fileprivate
func
preparePulse
()
{
pulse
=
Pulse
(
pulseView
:
self
,
pulseL
ayer
:
visualLayer
)
pulse
=
Pulse
(
view
:
self
,
l
ayer
:
visualLayer
)
}
}
}
}
Sources/iOS/Snackbar.swift
View file @
777f4942
...
@@ -44,7 +44,8 @@ open class Snackbar: Bar {
...
@@ -44,7 +44,8 @@ open class Snackbar: Bar {
}
}
set
(
value
)
{
set
(
value
)
{
textLabel
.
text
=
value
textLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/TabBar.swift
View file @
777f4942
...
@@ -118,7 +118,8 @@ open class TabBar: Bar {
...
@@ -118,7 +118,8 @@ open class TabBar: Bar {
centerViews
=
buttons
as
[
UIView
]
centerViews
=
buttons
as
[
UIView
]
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -152,7 +153,8 @@ open class TabBar: Bar {
...
@@ -152,7 +153,8 @@ open class TabBar: Bar {
/// A value for the line alignment.
/// A value for the line alignment.
open
var
lineAlignment
=
TabBarLineAlignment
.
bottom
{
open
var
lineAlignment
=
TabBarLineAlignment
.
bottom
{
didSet
{
didSet
{
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/TableViewCell.swift
View file @
777f4942
...
@@ -44,7 +44,7 @@ open class TableViewCell: UITableViewCell, Pulseable, PulseableLayer {
...
@@ -44,7 +44,7 @@ open class TableViewCell: UITableViewCell, Pulseable, PulseableLayer {
/// A reference to the pulse layer.
/// A reference to the pulse layer.
internal
var
pulseLayer
:
CALayer
?
{
internal
var
pulseLayer
:
CALayer
?
{
return
pulse
.
pulseL
ayer
return
pulse
.
l
ayer
}
}
/// PulseAnimation value.
/// PulseAnimation value.
...
@@ -180,7 +180,7 @@ open class TableViewCell: UITableViewCell, Pulseable, PulseableLayer {
...
@@ -180,7 +180,7 @@ open class TableViewCell: UITableViewCell, Pulseable, PulseableLayer {
extension
TableViewCell
{
extension
TableViewCell
{
/// Prepares the pulse motion.
/// Prepares the pulse motion.
fileprivate
func
preparePulse
()
{
fileprivate
func
preparePulse
()
{
pulse
=
Pulse
(
pulseView
:
self
,
pulseL
ayer
:
visualLayer
)
pulse
=
Pulse
(
view
:
self
,
l
ayer
:
visualLayer
)
}
}
/// Prepares the visualLayer property.
/// Prepares the visualLayer property.
...
...
Sources/iOS/TextField.swift
View file @
777f4942
...
@@ -88,7 +88,8 @@ open class TextField: UITextField {
...
@@ -88,7 +88,8 @@ open class TextField: UITextField {
open
override
var
leftView
:
UIView
?
{
open
override
var
leftView
:
UIView
?
{
didSet
{
didSet
{
prepareLeftView
()
prepareLeftView
()
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -185,7 +186,8 @@ open class TextField: UITextField {
...
@@ -185,7 +186,8 @@ open class TextField: UITextField {
}
}
set
(
value
)
{
set
(
value
)
{
placeholderLabel
.
text
=
value
placeholderLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -225,7 +227,8 @@ open class TextField: UITextField {
...
@@ -225,7 +227,8 @@ open class TextField: UITextField {
}
}
set
(
value
)
{
set
(
value
)
{
detailLabel
.
text
=
value
detailLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -285,7 +288,8 @@ open class TextField: UITextField {
...
@@ -285,7 +288,8 @@ open class TextField: UITextField {
rightView
=
clearIconButton
rightView
=
clearIconButton
isClearIconButtonAutoHandled
=
isClearIconButtonAutoHandled
?
true
:
false
isClearIconButtonAutoHandled
=
isClearIconButtonAutoHandled
?
true
:
false
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -332,7 +336,8 @@ open class TextField: UITextField {
...
@@ -332,7 +336,8 @@ open class TextField: UITextField {
rightView
=
visibilityIconButton
rightView
=
visibilityIconButton
isVisibilityIconButtonAutoHandled
=
isVisibilityIconButtonAutoHandled
?
true
:
false
isVisibilityIconButtonAutoHandled
=
isVisibilityIconButtonAutoHandled
?
true
:
false
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
Sources/iOS/Toolbar.swift
View file @
777f4942
...
@@ -41,7 +41,8 @@ open class Toolbar: Bar {
...
@@ -41,7 +41,8 @@ open class Toolbar: Bar {
}
}
set
(
value
)
{
set
(
value
)
{
titleLabel
.
text
=
value
titleLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
@@ -57,7 +58,8 @@ open class Toolbar: Bar {
...
@@ -57,7 +58,8 @@ open class Toolbar: Bar {
}
}
set
(
value
)
{
set
(
value
)
{
detailLabel
.
text
=
value
detailLabel
.
text
=
value
layoutSubviews
()
setNeedsLayout
()
layoutIfNeeded
()
}
}
}
}
...
...
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