Commit 5c2d849d by Daniel Dahan

development: added centerViews to NavigationItem

parent 3386efad
......@@ -67,6 +67,13 @@ public class NavigationItem: NSObject {
navigationBar?.layoutSubviews()
}
}
/// Center items.
public var centerViews = [UIView]() {
didSet {
navigationBar?.layoutSubviews()
}
}
public var navigationBar: NavigationBar? {
return contentView.superview?.superview as? NavigationBar
......@@ -194,4 +201,14 @@ extension UINavigationItem {
navigationItem.rightViews = value
}
}
/// Center UIViews.
open var centerViews: [UIView] {
get {
return navigationItem.contentView.grid.views
}
set(value) {
navigationItem.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