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
ee34ac7d
Commit
ee34ac7d
authored
Sep 23, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added automatic removal of subviews when reloading button containers
parent
2904209e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
Source/BasicCardView.swift
+4
-0
Source/ImageCardView.swift
+4
-0
Source/NavigationBarView.swift
+8
-0
No files found.
Source/BasicCardView.swift
View file @
ee34ac7d
...
@@ -324,6 +324,10 @@ public class BasicCardView : MaterialCardView, Comparable {
...
@@ -324,6 +324,10 @@ public class BasicCardView : MaterialCardView, Comparable {
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
addSubview
(
buttonsContainer
!
)
addSubview
(
buttonsContainer
!
)
}
else
{
for
v
in
buttonsContainer
!.
subviews
{
v
.
removeFromSuperview
()
}
}
}
reloadView
()
reloadView
()
}
}
...
...
Source/ImageCardView.swift
View file @
ee34ac7d
...
@@ -453,6 +453,10 @@ public class ImageCardView : MaterialCardView, Comparable {
...
@@ -453,6 +453,10 @@ public class ImageCardView : MaterialCardView, Comparable {
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
addSubview
(
buttonsContainer
!
)
addSubview
(
buttonsContainer
!
)
}
else
{
for
v
in
buttonsContainer
!.
subviews
{
v
.
removeFromSuperview
()
}
}
}
reloadView
()
reloadView
()
}
}
...
...
Source/NavigationBarView.swift
View file @
ee34ac7d
...
@@ -86,6 +86,10 @@ public class NavigationBarView: UIView {
...
@@ -86,6 +86,10 @@ public class NavigationBarView: UIView {
leftButtonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
leftButtonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
leftButtonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
leftButtonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
addSubview
(
leftButtonsContainer
!
)
addSubview
(
leftButtonsContainer
!
)
}
else
{
for
v
in
leftButtonsContainer
!.
subviews
{
v
.
removeFromSuperview
()
}
}
}
reloadView
()
reloadView
()
}
}
...
@@ -109,6 +113,10 @@ public class NavigationBarView: UIView {
...
@@ -109,6 +113,10 @@ public class NavigationBarView: UIView {
rightButtonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
rightButtonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
rightButtonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
rightButtonsContainer
!.
backgroundColor
=
MaterialTheme
.
clear
.
color
addSubview
(
rightButtonsContainer
!
)
addSubview
(
rightButtonsContainer
!
)
}
else
{
for
v
in
rightButtonsContainer
!.
subviews
{
v
.
removeFromSuperview
()
}
}
}
reloadView
()
reloadView
()
}
}
...
...
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