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
74978847
Commit
74978847
authored
Dec 24, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
cb070075
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
11 deletions
+24
-11
Sources/iOS/Bar.swift
+6
-4
Sources/iOS/Card.swift
+6
-0
Sources/iOS/ChipBar.swift
+2
-2
Sources/iOS/FABMenu.swift
+1
-0
Sources/iOS/Grid.swift
+3
-2
Sources/iOS/ImageCard.swift
+2
-0
Sources/iOS/PresenterCard.swift
+2
-0
Sources/iOS/TabBar.swift
+2
-3
No files found.
Sources/iOS/Bar.swift
View file @
74978847
...
@@ -110,9 +110,10 @@ open class Bar: View {
...
@@ -110,9 +110,10 @@ open class Bar: View {
/// Left side UIViews.
/// Left side UIViews.
open
var
leftViews
=
[
UIView
]()
{
open
var
leftViews
=
[
UIView
]()
{
didSet
{
didSet
{
for
v
in
oldValue
{
oldValue
.
forEach
{
v
.
removeFromSuperview
()
$0
.
removeFromSuperview
()
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
@@ -120,9 +121,10 @@ open class Bar: View {
...
@@ -120,9 +121,10 @@ open class Bar: View {
/// Right side UIViews.
/// Right side UIViews.
open
var
rightViews
=
[
UIView
]()
{
open
var
rightViews
=
[
UIView
]()
{
didSet
{
didSet
{
for
v
in
oldValue
{
oldValue
.
forEach
{
v
.
removeFromSuperview
()
$0
.
removeFromSuperview
()
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
...
Sources/iOS/Card.swift
View file @
74978847
...
@@ -69,9 +69,11 @@ open class Card: PulseView {
...
@@ -69,9 +69,11 @@ open class Card: PulseView {
open
var
toolbar
:
Toolbar
?
{
open
var
toolbar
:
Toolbar
?
{
didSet
{
didSet
{
oldValue
?
.
removeFromSuperview
()
oldValue
?
.
removeFromSuperview
()
if
let
v
=
toolbar
{
if
let
v
=
toolbar
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
@@ -96,10 +98,12 @@ open class Card: PulseView {
...
@@ -96,10 +98,12 @@ open class Card: PulseView {
open
var
contentView
:
UIView
?
{
open
var
contentView
:
UIView
?
{
didSet
{
didSet
{
oldValue
?
.
removeFromSuperview
()
oldValue
?
.
removeFromSuperview
()
if
let
v
=
contentView
{
if
let
v
=
contentView
{
v
.
clipsToBounds
=
true
v
.
clipsToBounds
=
true
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
@@ -124,9 +128,11 @@ open class Card: PulseView {
...
@@ -124,9 +128,11 @@ open class Card: PulseView {
open
var
bottomBar
:
Bar
?
{
open
var
bottomBar
:
Bar
?
{
didSet
{
didSet
{
oldValue
?
.
removeFromSuperview
()
oldValue
?
.
removeFromSuperview
()
if
let
v
=
bottomBar
{
if
let
v
=
bottomBar
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
...
Sources/iOS/ChipBar.swift
View file @
74978847
...
@@ -207,8 +207,8 @@ open class ChipBar: Bar {
...
@@ -207,8 +207,8 @@ open class ChipBar: Bar {
/// Buttons.
/// Buttons.
open
var
chipItems
=
[
ChipItem
]()
{
open
var
chipItems
=
[
ChipItem
]()
{
didSet
{
didSet
{
for
b
in
oldValue
{
oldValue
.
forEach
{
b
.
removeFromSuperview
()
$0
.
removeFromSuperview
()
}
}
prepareChipItems
()
prepareChipItems
()
...
...
Sources/iOS/FABMenu.swift
View file @
74978847
...
@@ -227,6 +227,7 @@ open class FABMenu: View {
...
@@ -227,6 +227,7 @@ open class FABMenu: View {
}
}
addSubview
(
v
)
addSubview
(
v
)
v
.
addTarget
(
self
,
action
:
#selector(
handleFABButton(button:)
)
,
for
:
.
touchUpInside
)
v
.
addTarget
(
self
,
action
:
#selector(
handleFABButton(button:)
)
,
for
:
.
touchUpInside
)
}
}
}
}
...
...
Sources/iOS/Grid.swift
View file @
74978847
...
@@ -157,9 +157,10 @@ public struct Grid {
...
@@ -157,9 +157,10 @@ public struct Grid {
/// An Array of UIButtons.
/// An Array of UIButtons.
public
var
views
=
[
UIView
]()
{
public
var
views
=
[
UIView
]()
{
didSet
{
didSet
{
for
v
in
oldValue
{
oldValue
.
forEach
{
v
.
removeFromSuperview
()
$0
.
removeFromSuperview
()
}
}
reload
()
reload
()
}
}
}
}
...
...
Sources/iOS/ImageCard.swift
View file @
74978847
...
@@ -62,9 +62,11 @@ open class ImageCard: Card {
...
@@ -62,9 +62,11 @@ open class ImageCard: Card {
open
var
imageView
:
UIImageView
?
{
open
var
imageView
:
UIImageView
?
{
didSet
{
didSet
{
oldValue
?
.
removeFromSuperview
()
oldValue
?
.
removeFromSuperview
()
if
let
v
=
imageView
{
if
let
v
=
imageView
{
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
...
Sources/iOS/PresenterCard.swift
View file @
74978847
...
@@ -51,10 +51,12 @@ open class PresenterCard: Card {
...
@@ -51,10 +51,12 @@ open class PresenterCard: Card {
open
var
presenterView
:
UIView
?
{
open
var
presenterView
:
UIView
?
{
didSet
{
didSet
{
oldValue
?
.
removeFromSuperview
()
oldValue
?
.
removeFromSuperview
()
if
let
v
=
presenterView
{
if
let
v
=
presenterView
{
v
.
clipsToBounds
=
true
v
.
clipsToBounds
=
true
container
.
addSubview
(
v
)
container
.
addSubview
(
v
)
}
}
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
...
Sources/iOS/TabBar.swift
View file @
74978847
...
@@ -212,12 +212,11 @@ open class TabBar: Bar {
...
@@ -212,12 +212,11 @@ open class TabBar: Bar {
@objc
@objc
open
var
tabItems
=
[
TabItem
]()
{
open
var
tabItems
=
[
TabItem
]()
{
didSet
{
didSet
{
for
b
in
oldValue
{
oldValue
.
forEach
{
b
.
removeFromSuperview
()
$0
.
removeFromSuperview
()
}
}
prepareTabItems
()
prepareTabItems
()
layoutSubviews
()
layoutSubviews
()
}
}
}
}
...
...
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