1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- //
- // DesignableViews.swift
- // SolarLamp
- //
- // Created by liaolj on 16/9/23.
- // Copyright © 2016年 SolarLamp. All rights reserved.
- //
- import Foundation
- import UIKit
- class UISwitchCustom: UISwitch {
- @IBInspectable var OffTint: UIColor? {
- didSet {
- self.tintColor = OffTint
- self.layer.cornerRadius = 16
- self.backgroundColor = OffTint
- }
- }
- }
- @IBDesignable
- class KKWLabel: UILabel {
- // @IBInspectable var cornerRadius: CGFloat {
- // get {
- // return layer.cornerRadius
- // }
- // set {
- // layer.cornerRadius = newValue
- // layer.masksToBounds = newValue > 0
- // }
- // }
- //
- // @IBInspectable var borderWidth: CGFloat = 0 {
- // didSet {
- // layer.borderWidth = borderWidth
- // }
- // }
- // @IBInspectable var borderColor: UIColor? {
- // didSet {
- // layer.borderColor = borderColor?.cgColor
- // }
- // }
- }
- @IBDesignable
- open class KKWButton: UIButton {
- // @IBInspectable open var cornerRadius: CGFloat {
- // get {
- // return layer.cornerRadius
- // }
- // set {
- // layer.cornerRadius = newValue
- // layer.masksToBounds = newValue > 0
- // }
- // }
- //
- // @IBInspectable open var borderWidth: CGFloat = 0 {
- // didSet {
- // layer.borderWidth = borderWidth
- // }
- // }
- // @IBInspectable open var borderColor: UIColor? {
- // didSet {
- // layer.borderColor = borderColor?.cgColor
- // }
- // }
-
- }
- @IBDesignable
- open class KKWView: UIView {
- // @IBInspectable open var cornerRadius: CGFloat {
- // get {
- // return layer.cornerRadius
- // }
- // set {
- // layer.cornerRadius = newValue
- // layer.masksToBounds = newValue > 0
- // }
- // }
- //
- // @IBInspectable open var borderWidth: CGFloat = 0 {
- // didSet {
- // layer.borderWidth = borderWidth
- // }
- // }
- // @IBInspectable open var borderColor: UIColor? {
- // didSet {
- // layer.borderColor = borderColor?.cgColor
- // }
- // }
- }
-
|