Commit 04ac45fa by Daniel Dahan

development: fixed recursion issue with Snackbar and reloading

parent 8fd89991
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.2.0</string> <string>2.2.1</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -125,12 +125,15 @@ open class Bar: View { ...@@ -125,12 +125,15 @@ open class Bar: View {
} }
/// Center UIViews. /// Center UIViews.
open var centerViews = [UIView]() { open var centerViews: [UIView] {
didSet { get {
for v in oldValue { return contentView.grid.views
}
set(value) {
for v in contentView.grid.views {
v.removeFromSuperview() v.removeFromSuperview()
} }
layoutSubviews() contentView.grid.views = value
} }
} }
...@@ -227,7 +230,6 @@ open class Bar: View { ...@@ -227,7 +230,6 @@ open class Bar: View {
} }
contentView.grid.begin() contentView.grid.begin()
contentView.grid.views = centerViews
if .center == contentViewAlignment { if .center == contentViewAlignment {
if lc < rc { if lc < rc {
......
...@@ -75,12 +75,15 @@ public class NavigationItem: NSObject { ...@@ -75,12 +75,15 @@ public class NavigationItem: NSObject {
} }
/// Center items. /// Center items.
public var centerViews = [UIView]() { public var centerViews: [UIView] {
didSet { get {
for v in oldValue { return contentView.grid.views
}
set(value) {
for v in contentView.grid.views {
v.removeFromSuperview() 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