Commit 04ac45fa by Daniel Dahan

development: fixed recursion issue with Snackbar and reloading

parent 8fd89991
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.0</string>
<string>2.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -125,12 +125,15 @@ open class Bar: View {
}
/// Center UIViews.
open var centerViews = [UIView]() {
didSet {
for v in oldValue {
open var centerViews: [UIView] {
get {
return contentView.grid.views
}
set(value) {
for v in contentView.grid.views {
v.removeFromSuperview()
}
layoutSubviews()
contentView.grid.views = value
}
}
......@@ -227,7 +230,6 @@ open class Bar: View {
}
contentView.grid.begin()
contentView.grid.views = centerViews
if .center == contentViewAlignment {
if lc < rc {
......
......@@ -75,12 +75,15 @@ public class NavigationItem: NSObject {
}
/// Center items.
public var centerViews = [UIView]() {
didSet {
for v in oldValue {
public var centerViews: [UIView] {
get {
return contentView.grid.views
}
set(value) {
for v in contentView.grid.views {
v.removeFromSuperview()
}
navigationBar?.layoutSubviews()
contentView.grid.views = value
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment