Skip to content

Commit

Permalink
Made several elements IBInspectable
Browse files Browse the repository at this point in the history
  • Loading branch information
josephkhawly committed Aug 3, 2015
1 parent d2112b2 commit 6df854a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions AKPickerView/AKPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,18 +240,24 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD
}
/// Readwrite. A font which used in NOT selected cells.
public lazy var font = UIFont.systemFontOfSize(20)

/// Readwrite. A font which used in selected cells.
public lazy var highlightedFont = UIFont.boldSystemFontOfSize(20)

/// Readwrite. A color of the text on NOT selected cells.
public lazy var textColor = UIColor.darkGrayColor()
@IBInspectable public lazy var textColor: UIColor = UIColor.darkGrayColor()

/// Readwrite. A color of the text on selected cells.
public lazy var highlightedTextColor = UIColor.blackColor()
@IBInspectable public lazy var highlightedTextColor: UIColor = UIColor.blackColor()

/// Readwrite. A float value which indicates the spacing between cells.
public var interitemSpacing: CGFloat = 0.0
@IBInspectable public var interitemSpacing: CGFloat = 0.0

/// Readwrite. The style of the picker view. See AKPickerViewStyle.
public var pickerViewStyle = AKPickerViewStyle.Wheel

/// Readwrite. A float value which determines the perspective representation which used when using AKPickerViewStyle.Wheel style.
public var viewDepth: CGFloat = 1000.0 {
@IBInspectable public var viewDepth: CGFloat = 1000.0 {
didSet {
self.collectionView.layer.sublayerTransform = self.viewDepth > 0.0 ? {
var transform = CATransform3DIdentity;
Expand All @@ -261,7 +267,7 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD
}
}
/// Readwrite. A boolean value indicates whether the mask is disabled.
public var maskDisabled: Bool! = nil {
@IBInspectable public var maskDisabled: Bool! = nil {
didSet {
self.collectionView.layer.mask = self.maskDisabled == true ? nil : {
let maskLayer = CAGradientLayer()
Expand Down

0 comments on commit 6df854a

Please sign in to comment.