Commit ef355c28 by Daniel Dahan

fixing conflicted files

parent 6b0bd134
......@@ -45,7 +45,7 @@ extension UIViewController {
This is the recommended method of accessing the ChipBarController
through child UIViewControllers.
*/
public var chipsController: ChipBarController? {
public var chipBarController: ChipBarController? {
return traverseViewControllerHierarchyForClassType()
}
}
......
......@@ -114,13 +114,17 @@ open class CollectionView: UICollectionView {
- Parameter frame: A CGRect defining the view's frame.
*/
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()
}
/// A convenience initializer that initializes the object.
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()
}
......
......@@ -160,16 +160,18 @@ open class Layer: CAShapeLayer {
layoutVisualLayer()
layoutShadowPath()
}
}
fileprivate extension Layer {
/// Prepares the visualLayer property.
open func prepareVisualLayer() {
func prepareVisualLayer() {
visualLayer.zPosition = 0
visualLayer.masksToBounds = true
addSublayer(visualLayer)
}
/// Manages the layout for the visualLayer property.
internal func layoutVisualLayer() {
func layoutVisualLayer() {
visualLayer.frame = bounds
visualLayer.cornerRadius = cornerRadius
}
......
......@@ -566,7 +566,7 @@ fileprivate extension TextField {
case .left, .natural:
placeholderLabel.frame.origin.x = w + placeholderHorizontalOffset
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
}
......@@ -707,7 +707,7 @@ extension TextField {
case .left, .natural:
s.placeholderLabel.frame.origin.x = s.leftViewWidth + s.textInset + s.placeholderHorizontalOffset
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
}
......
......@@ -33,10 +33,34 @@ import UIKit
fileprivate var ToolbarContext: UInt8 = 0
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.
@IBInspectable
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.
@IBInspectable
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