Commit ef355c28 by Daniel Dahan

fixing conflicted files

parent 6b0bd134
...@@ -45,7 +45,7 @@ extension UIViewController { ...@@ -45,7 +45,7 @@ extension UIViewController {
This is the recommended method of accessing the ChipBarController This is the recommended method of accessing the ChipBarController
through child UIViewControllers. through child UIViewControllers.
*/ */
public var chipsController: ChipBarController? { public var chipBarController: ChipBarController? {
return traverseViewControllerHierarchyForClassType() return traverseViewControllerHierarchyForClassType()
} }
} }
......
...@@ -114,13 +114,17 @@ open class CollectionView: UICollectionView { ...@@ -114,13 +114,17 @@ open class CollectionView: UICollectionView {
- Parameter frame: A CGRect defining the view's frame. - Parameter frame: A CGRect defining the view's frame.
*/ */
public init(frame: CGRect) { public init(frame: CGRect) {
super.init(frame: frame, collectionViewLayout: CollectionViewLayout()) let layout = UICollectionViewFlowLayout()
layout.itemSize = CGSize(width: 100, height: 100)
super.init(frame: frame, collectionViewLayout: layout)
prepare() prepare()
} }
/// A convenience initializer that initializes the object. /// A convenience initializer that initializes the object.
public init() { public init() {
super.init(frame: .zero, collectionViewLayout: CollectionViewLayout()) let layout = UICollectionViewFlowLayout()
layout.itemSize = CGSize(width: 100, height: 100)
super.init(frame: .zero, collectionViewLayout: layout)
prepare() prepare()
} }
......
...@@ -160,16 +160,18 @@ open class Layer: CAShapeLayer { ...@@ -160,16 +160,18 @@ open class Layer: CAShapeLayer {
layoutVisualLayer() layoutVisualLayer()
layoutShadowPath() layoutShadowPath()
} }
}
fileprivate extension Layer {
/// Prepares the visualLayer property. /// Prepares the visualLayer property.
open func prepareVisualLayer() { func prepareVisualLayer() {
visualLayer.zPosition = 0 visualLayer.zPosition = 0
visualLayer.masksToBounds = true visualLayer.masksToBounds = true
addSublayer(visualLayer) addSublayer(visualLayer)
} }
/// Manages the layout for the visualLayer property. /// Manages the layout for the visualLayer property.
internal func layoutVisualLayer() { func layoutVisualLayer() {
visualLayer.frame = bounds visualLayer.frame = bounds
visualLayer.cornerRadius = cornerRadius visualLayer.cornerRadius = cornerRadius
} }
......
...@@ -566,7 +566,7 @@ fileprivate extension TextField { ...@@ -566,7 +566,7 @@ fileprivate extension TextField {
case .left, .natural: case .left, .natural:
placeholderLabel.frame.origin.x = w + placeholderHorizontalOffset placeholderLabel.frame.origin.x = w + placeholderHorizontalOffset
case .right: case .right:
placeholderLabel.frame.origin.x = bounds.width - placeholderLabel.bounds.width - textInset + placeholderHorizontalOffset placeholderLabel.frame.origin.x = (bounds.width * (1.0 - placeholderActiveScale)) - textInset + placeholderHorizontalOffset
default:break default:break
} }
...@@ -707,7 +707,7 @@ extension TextField { ...@@ -707,7 +707,7 @@ extension TextField {
case .left, .natural: case .left, .natural:
s.placeholderLabel.frame.origin.x = s.leftViewWidth + s.textInset + s.placeholderHorizontalOffset s.placeholderLabel.frame.origin.x = s.leftViewWidth + s.textInset + s.placeholderHorizontalOffset
case .right: case .right:
s.placeholderLabel.frame.origin.x = s.bounds.width - s.placeholderLabel.bounds.width - s.textInset + s.placeholderHorizontalOffset s.placeholderLabel.frame.origin.x = (s.bounds.width * (1.0 - s.placeholderActiveScale)) - s.textInset + s.placeholderHorizontalOffset
default:break default:break
} }
......
...@@ -33,10 +33,34 @@ import UIKit ...@@ -33,10 +33,34 @@ import UIKit
fileprivate var ToolbarContext: UInt8 = 0 fileprivate var ToolbarContext: UInt8 = 0
open class Toolbar: Bar { open class Toolbar: Bar {
/// A convenience property to set the titleLabel.text.
@IBInspectable
open var title: String? {
get {
return titleLabel.text
}
set(value) {
titleLabel.text = value
layoutSubviews()
}
}
/// Title label. /// Title label.
@IBInspectable @IBInspectable
open let titleLabel = UILabel() open let titleLabel = UILabel()
/// A convenience property to set the detailLabel.text.
@IBInspectable
open var detail: String? {
get {
return detailLabel.text
}
set(value) {
detailLabel.text = value
layoutSubviews()
}
}
/// Detail label. /// Detail label.
@IBInspectable @IBInspectable
open let detailLabel = UILabel() open let detailLabel = UILabel()
......
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