Commit 0372b3bc by Daniel Dahan

development: added isDividerHidden for the Divider UIView extension

parent f4f1645c
...@@ -43,7 +43,8 @@ open class BottomTabBar: UITabBar { ...@@ -43,7 +43,8 @@ open class BottomTabBar: UITabBar {
} }
/// Automatically aligns the BottomNavigationBar to the superview. /// Automatically aligns the BottomNavigationBar to the superview.
open var isAlignedToParentAutomatically = true @IBInspectable
open var isAlignedToParentAutomatically = true
/// A property that accesses the backing layer's background /// A property that accesses the backing layer's background
@IBInspectable @IBInspectable
......
...@@ -104,6 +104,15 @@ public struct Divider { ...@@ -104,6 +104,15 @@ public struct Divider {
self.thickness = thickness self.thickness = thickness
} }
/**
Hides the divier line.
*/
internal var isHidden = false {
didSet {
line?.isHidden = isHidden
}
}
/// Lays out the divider. /// Lays out the divider.
public func reload() { public func reload() {
guard let l = line, let v = view else { guard let l = line, let v = view else {
...@@ -172,6 +181,17 @@ extension UIView { ...@@ -172,6 +181,17 @@ extension UIView {
} }
} }
/// Divider visibility.
@IBInspectable
open var isDividerHidden: Bool {
get {
return divider.isHidden
}
set(value) {
divider.isHidden = value
}
}
/// Divider animation. /// Divider animation.
open var dividerAlignment: DividerAlignment { open var dividerAlignment: DividerAlignment {
get { get {
......
...@@ -94,9 +94,9 @@ open class Switch: UIControl { ...@@ -94,9 +94,9 @@ open class Switch: UIControl {
/// Indicates if the animation should bounce. /// Indicates if the animation should bounce.
@IBInspectable @IBInspectable
open var bounceable = true { open var isBounceable = true {
didSet { didSet {
bounceOffset = bounceable ? 3 : 0 bounceOffset = isBounceable ? 3 : 0
} }
} }
......
...@@ -81,6 +81,7 @@ open class TabBar: Bar { ...@@ -81,6 +81,7 @@ open class TabBar: Bar {
} }
/// A boolean to animate the line when touched. /// A boolean to animate the line when touched.
@IBInspectable
open var isLineAnimated = true { open var isLineAnimated = true {
didSet { didSet {
for b in buttons { for b in buttons {
......
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