Commit a1629384 by Daniel Dahan

updated NavigationBarView with auto handling for orientation changes

parent fedaf01a
...@@ -40,7 +40,7 @@ class ViewController: UIViewController, MaterialSwitchDelegate { ...@@ -40,7 +40,7 @@ class ViewController: UIViewController, MaterialSwitchDelegate {
super.viewDidLoad() super.viewDidLoad()
prepareView() prepareView()
prepareSmallMaterialSwitch() prepareSmallMaterialSwitch()
prepareNormalMaterialSwitch() prepareDefaultMaterialSwitch()
prepareLargeMaterialSwitch() prepareLargeMaterialSwitch()
prepareLightOnDisabledMaterialSwitch() prepareLightOnDisabledMaterialSwitch()
prepareLightOffDisabledMaterialSwitch() prepareLightOffDisabledMaterialSwitch()
...@@ -55,76 +55,75 @@ class ViewController: UIViewController, MaterialSwitchDelegate { ...@@ -55,76 +55,75 @@ class ViewController: UIViewController, MaterialSwitchDelegate {
/// Prepares the Small MaterialSwitch. /// Prepares the Small MaterialSwitch.
private func prepareSmallMaterialSwitch() { private func prepareSmallMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Small) let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Small)
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.y -= 100 switchControl.y -= 100
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
/// Prepares the Normal MaterialSwitch. /// Prepares the Default MaterialSwitch.
private func prepareNormalMaterialSwitch() { private func prepareDefaultMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .On, style: .Light, size: .Normal) let switchControl: MaterialSwitch = MaterialSwitch(state: .On, style: .Light)
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
materialSwitch.translatesAutoresizingMaskIntoConstraints = false switchControl.translatesAutoresizingMaskIntoConstraints = false
MaterialLayout.size(view, child: materialSwitch, width: materialSwitch.width, height: materialSwitch.height) MaterialLayout.alignFromBottomRight(view, child: switchControl, bottom: 16, right: 16)
MaterialLayout.alignFromBottomRight(view, child: materialSwitch, bottom: 16, right: 16)
} }
/// Prepares the Large MaterialSwitch. /// Prepares the Large MaterialSwitch.
private func prepareLargeMaterialSwitch() { private func prepareLargeMaterialSwitch() {
let image: UIImage? = UIImage(named: "ic_alarm_white_18pt") let image: UIImage? = UIImage(named: "ic_alarm_white_18pt")
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Large) let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Large)
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.y -= 50 switchControl.y -= 50
materialSwitch.delegate = self switchControl.delegate = self
materialSwitch.button.setImage(image, forState: .Normal) switchControl.button.setImage(image, forState: .Normal)
materialSwitch.button.setImage(image, forState: .Highlighted) switchControl.button.setImage(image, forState: .Highlighted)
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
/// Prepares the Light On enabled = false MaterialSwitch. /// Prepares the Light On enabled = false MaterialSwitch.
private func prepareLightOnDisabledMaterialSwitch() { private func prepareLightOnDisabledMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .On, style: .Light, size: .Normal) let switchControl: MaterialSwitch = MaterialSwitch(state: .On, style: .Light)
materialSwitch.enabled = false switchControl.enabled = false
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
/// Prepares the Light Off enabled = false MaterialSwitch. /// Prepares the Light Off enabled = false MaterialSwitch.
private func prepareLightOffDisabledMaterialSwitch() { private func prepareLightOffDisabledMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Normal) let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .Light)
materialSwitch.enabled = false switchControl.enabled = false
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.y += 50 switchControl.y += 50
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
/// Prepares the Dark On enabled = false MaterialSwitch. /// Prepares the Dark On enabled = false MaterialSwitch.
private func prepareDarkOnDisabledMaterialSwitch() { private func prepareDarkOnDisabledMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .On, style: .Dark, size: .Normal) let switchControl: MaterialSwitch = MaterialSwitch(state: .On, style: .Dark)
materialSwitch.enabled = false switchControl.enabled = false
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.y += 100 switchControl.y += 100
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
/// Prepares the Dark On enabled = false MaterialSwitch. /// Prepares the Dark On enabled = false MaterialSwitch.
private func prepareDarkOffDisabledMaterialSwitch() { private func prepareDarkOffDisabledMaterialSwitch() {
let materialSwitch: MaterialSwitch = MaterialSwitch(state: .Off, style: .Dark, size: .Normal) let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .Dark)
materialSwitch.enabled = false switchControl.enabled = false
materialSwitch.center = view.center switchControl.center = view.center
materialSwitch.y += 150 switchControl.y += 150
materialSwitch.delegate = self switchControl.delegate = self
view.addSubview(materialSwitch) view.addSubview(switchControl)
} }
internal func materialSwitchStateChanged(control: MaterialSwitch, state: MaterialSwitchState) { internal func switchControlStateChanged(control: MaterialSwitch, state: MaterialSwitchState) {
print("MaterialSwitch - Size: \(control.switchSize) State: \(state)") print("MaterialSwitch - Size: \(control.switchSize) State: \(state)")
} }
} }
...@@ -81,7 +81,7 @@ class ViewController: UIViewController { ...@@ -81,7 +81,7 @@ class ViewController: UIViewController {
searchBarView.textField.font = RobotoFont.regularWithSize(22) searchBarView.textField.font = RobotoFont.regularWithSize(22)
searchBarView.leftControls = [menuButton] searchBarView.leftControls = [menuButton]
searchBarView.rightControls = [searchButton] // searchBarView.rightControls = [searchButton]
view.addSubview(searchBarView) view.addSubview(searchBarView)
searchBarView.translatesAutoresizingMaskIntoConstraints = false searchBarView.translatesAutoresizingMaskIntoConstraints = false
......
...@@ -69,17 +69,15 @@ Material is a growing project and will encounter changes throughout its developm ...@@ -69,17 +69,15 @@ Material is a growing project and will encounter changes throughout its developm
## Upcoming ## Upcoming
* SearchBarView * MenuViewController
* SearchBarViewController * SearchBarViewController
* TabView * TabView
* TabViewController * TabViewController
* Scrolling Techniques * Scrolling Techniques
* Dialogs
* Snackbar * Snackbar
* ProgressBar (circular and horizontal) * ProgressBar (circular and horizontal)
* DatePicker * DatePicker
* TimePicker * TimePicker
* Switch Control
* More Examples * More Examples
<a name="materialcolor"></a> <a name="materialcolor"></a>
......
...@@ -297,7 +297,7 @@ public class MaterialButton : UIButton { ...@@ -297,7 +297,7 @@ public class MaterialButton : UIButton {
prepareView() prepareView()
} }
/// A convenience initializer that is mostly used with AutoLayout. /// A convenience initializer.
public convenience init() { public convenience init() {
self.init(frame: CGRectNull) self.init(frame: CGRectNull)
} }
...@@ -406,8 +406,8 @@ public class MaterialButton : UIButton { ...@@ -406,8 +406,8 @@ public class MaterialButton : UIButton {
} }
if let v: CFTimeInterval = pulseAnimation(point!) { if let v: CFTimeInterval = pulseAnimation(point!) {
MaterialAnimation.delay(v) { [unowned self] in MaterialAnimation.delay(v) { [weak self] in
self.shrinkAnimation() self?.shrinkAnimation()
} }
} }
} }
...@@ -483,12 +483,12 @@ public class MaterialButton : UIButton { ...@@ -483,12 +483,12 @@ public class MaterialButton : UIButton {
pulseLayer.hidden = false pulseLayer.hidden = false
} }
pulseLayer.addAnimation(MaterialAnimation.scale(3 * d, duration: t), forKey: nil) pulseLayer.addAnimation(MaterialAnimation.scale(3 * d, duration: t), forKey: nil)
MaterialAnimation.delay(t) { [unowned self] in MaterialAnimation.delay(t) { [weak self] in
if nil != self.pulseColor && 0 < self.pulseColorOpacity { if nil != self && nil != self!.pulseColor && 0 < self!.pulseColorOpacity {
MaterialAnimation.animateWithDuration(t, animations: { MaterialAnimation.animateWithDuration(t, animations: {
pulseLayer.hidden = true pulseLayer.hidden = true
}) { }) {
pulseLayer.removeFromSuperlayer() pulseLayer.removeFromSuperlayer()
} }
} }
} }
......
...@@ -84,8 +84,8 @@ public class MaterialPulseView : MaterialView { ...@@ -84,8 +84,8 @@ public class MaterialPulseView : MaterialView {
} }
if let v: CFTimeInterval = pulseAnimation(point!) { if let v: CFTimeInterval = pulseAnimation(point!) {
MaterialAnimation.delay(v) { [unowned self] in MaterialAnimation.delay(v) { [weak self] in
self.shrinkAnimation() self?.shrinkAnimation()
} }
} }
} }
...@@ -137,12 +137,12 @@ public class MaterialPulseView : MaterialView { ...@@ -137,12 +137,12 @@ public class MaterialPulseView : MaterialView {
pulseLayer.hidden = false pulseLayer.hidden = false
} }
pulseLayer.addAnimation(MaterialAnimation.scale(3 * d, duration: t), forKey: nil) pulseLayer.addAnimation(MaterialAnimation.scale(3 * d, duration: t), forKey: nil)
MaterialAnimation.delay(t) { [unowned self] in MaterialAnimation.delay(t) { [weak self] in
if nil != self.pulseColor && 0 < self.pulseColorOpacity { if nil != self && nil != self!.pulseColor && 0 < self!.pulseColorOpacity {
MaterialAnimation.animateWithDuration(t, animations: { MaterialAnimation.animateWithDuration(t, animations: {
pulseLayer.hidden = true pulseLayer.hidden = true
}) { }) {
pulseLayer.removeFromSuperlayer() pulseLayer.removeFromSuperlayer()
} }
} }
} }
......
...@@ -42,7 +42,7 @@ public enum MaterialSwitchState { ...@@ -42,7 +42,7 @@ public enum MaterialSwitchState {
public enum MaterialSwitchSize { public enum MaterialSwitchSize {
case Small case Small
case Normal case Default
case Large case Large
} }
...@@ -195,14 +195,14 @@ public class MaterialSwitch: UIControl { ...@@ -195,14 +195,14 @@ public class MaterialSwitch: UIControl {
} }
/// MaterialSwitch size. /// MaterialSwitch size.
public var switchSize: MaterialSwitchSize = .Normal { public var switchSize: MaterialSwitchSize = .Default {
didSet { didSet {
switch switchSize { switch switchSize {
case .Small: case .Small:
trackThickness = 13 trackThickness = 13
buttonDiameter = 18 buttonDiameter = 18
frame = CGRectMake(0, 0, 30, 25) frame = CGRectMake(0, 0, 30, 25)
case .Normal: case .Default:
trackThickness = 17 trackThickness = 17
buttonDiameter = 24 buttonDiameter = 24
frame = CGRectMake(0, 0, 40, 30) frame = CGRectMake(0, 0, 40, 30)
...@@ -236,7 +236,7 @@ public class MaterialSwitch: UIControl { ...@@ -236,7 +236,7 @@ public class MaterialSwitch: UIControl {
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareTrack() prepareTrack()
prepareButton() prepareButton()
prepareSwitchSize(.Normal) prepareSwitchSize(.Default)
prepareSwitchStyle(.Light) prepareSwitchStyle(.Light)
prepareSwitchState(.Off) prepareSwitchState(.Off)
} }
...@@ -247,7 +247,7 @@ public class MaterialSwitch: UIControl { ...@@ -247,7 +247,7 @@ public class MaterialSwitch: UIControl {
- Parameter style: A MaterialSwitchStyle value. - Parameter style: A MaterialSwitchStyle value.
- Parameter size: A MaterialSwitchSize value. - Parameter size: A MaterialSwitchSize value.
*/ */
public init(state: MaterialSwitchState = .On, style: MaterialSwitchStyle = .Light, size: MaterialSwitchSize = .Normal) { public init(state: MaterialSwitchState = .On, style: MaterialSwitchStyle = .Light, size: MaterialSwitchSize = .Default) {
track = MaterialView(frame: CGRectZero) track = MaterialView(frame: CGRectZero)
button = FabButton(frame: CGRectZero) button = FabButton(frame: CGRectZero)
super.init(frame: CGRectZero) super.init(frame: CGRectZero)
...@@ -267,7 +267,7 @@ public class MaterialSwitch: UIControl { ...@@ -267,7 +267,7 @@ public class MaterialSwitch: UIControl {
switch switchSize { switch switchSize {
case .Small: case .Small:
return CGSizeMake(30, 25) return CGSizeMake(30, 25)
case .Normal: case .Default:
return CGSizeMake(40, 30) return CGSizeMake(40, 30)
case .Large: case .Large:
return CGSizeMake(50, 40) return CGSizeMake(50, 40)
...@@ -456,7 +456,7 @@ public class MaterialSwitch: UIControl { ...@@ -456,7 +456,7 @@ public class MaterialSwitch: UIControl {
switch switchSize { switch switchSize {
case .Small: case .Small:
w = 30 w = 30
case .Normal: case .Default:
w = 40 w = 40
case .Large: case .Large:
w = 50 w = 50
......
...@@ -336,7 +336,7 @@ public class MaterialView : UIView { ...@@ -336,7 +336,7 @@ public class MaterialView : UIView {
prepareView() prepareView()
} }
/// A convenience initializer that is mostly used with AutoLayout. /// A convenience initializer.
public convenience init() { public convenience init() {
self.init(frame: CGRectNull) self.init(frame: CGRectNull)
} }
......
...@@ -34,74 +34,41 @@ public class NavigationBarView : MaterialView { ...@@ -34,74 +34,41 @@ public class NavigationBarView : MaterialView {
/// TitleView that holds the titleLabel and detailLabel. /// TitleView that holds the titleLabel and detailLabel.
public private(set) lazy var titleView: MaterialView = MaterialView() public private(set) lazy var titleView: MaterialView = MaterialView()
/** /// Device status bar style.
:name: statusBarStyle
*/
public var statusBarStyle: UIStatusBarStyle = UIApplication.sharedApplication().statusBarStyle { public var statusBarStyle: UIStatusBarStyle = UIApplication.sharedApplication().statusBarStyle {
didSet { didSet {
UIApplication.sharedApplication().statusBarStyle = statusBarStyle UIApplication.sharedApplication().statusBarStyle = statusBarStyle
} }
} }
/** /// Title label.
:name: contentInsets
*/
public var contentInsetPreset: MaterialEdgeInset = .None {
didSet {
contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
}
}
/**
:name: contentInset
*/
public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet {
reloadView()
}
}
/**
:name: titleLabel
*/
public var titleLabel: UILabel? { public var titleLabel: UILabel? {
didSet { didSet {
if let v: UILabel = titleLabel { if let v: UILabel = titleLabel {
v.grid.rows = nil == detailLabel ? 3 : 2
titleView.addSubview(v) titleView.addSubview(v)
} }
reloadView() reloadView()
} }
} }
/** /// Detail label.
:name: detailLabel
*/
public var detailLabel: UILabel? { public var detailLabel: UILabel? {
didSet { didSet {
if let v: UILabel = detailLabel { if let v: UILabel = detailLabel {
v.grid.rows = 1
titleView.addSubview(v) titleView.addSubview(v)
titleLabel?.grid.rows = 2
} else {
titleLabel?.grid.rows = 3
} }
reloadView() reloadView()
} }
} }
/** /// Left side UIControls.
:name: leftControls
*/
public var leftControls: Array<UIControl>? { public var leftControls: Array<UIControl>? {
didSet { didSet {
reloadView() reloadView()
} }
} }
/** /// Right side UIControls.
:name: rightControls
*/
public var rightControls: Array<UIControl>? { public var rightControls: Array<UIControl>? {
didSet { didSet {
reloadView() reloadView()
...@@ -109,36 +76,74 @@ public class NavigationBarView : MaterialView { ...@@ -109,36 +76,74 @@ public class NavigationBarView : MaterialView {
} }
/** /**
:name: init An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance.
*/ */
public required init?(coder aDecoder: NSCoder) { public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
} }
/** /**
:name: init An initializer that initializes the object with a CGRect object.
If AutoLayout is used, it is better to initilize the instance
using the init() initializer.
- Parameter frame: A CGRect instance.
*/ */
public override init(frame: CGRect) { public override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
} }
/** /// A convenience initializer.
:name: init
*/
public convenience init() { public convenience init() {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 70)) self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 64))
} }
/** /**
:name: init A convenience initializer with parameter settings.
- Parameter titleLabel: UILabel for the title.
- Parameter detailLabel: UILabel for the details.
- Parameter leftControls: An Array of UIControls that go on the left side.
- Parameter rightControls: An Array of UIControls that go on the right side.
*/ */
public convenience init?(titleLabel: UILabel? = nil, detailLabel: UILabel? = nil, leftControls: Array<UIControl>? = nil, rightControls: Array<UIControl>? = nil) { public convenience init?(titleLabel: UILabel? = nil, detailLabel: UILabel? = nil, leftControls: Array<UIControl>? = nil, rightControls: Array<UIControl>? = nil) {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 70)) self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 64))
prepareProperties(titleLabel, detailLabel: detailLabel, leftControls: leftControls, rightControls: rightControls) prepareProperties(titleLabel, detailLabel: detailLabel, leftControls: leftControls, rightControls: rightControls)
} }
public override func layoutSubviews() { public override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
// General alignment.
switch UIDevice.currentDevice().orientation {
case .LandscapeLeft, .LandscapeRight:
grid.contentInset.top = 0
grid.contentInset.bottom = 0
titleView.grid.spacing = 2
titleView.grid.contentInset.top = 4
titleView.grid.contentInset.bottom = 8
height = 44
default:
grid.contentInset.top = 20
grid.contentInset.bottom = 8
titleView.grid.spacing = 0
titleView.grid.contentInset.top = 0
titleView.grid.contentInset.bottom = 0
height = 64
}
// TitleView alignment.
titleView.grid.axis.rows = 6
if let v: UILabel = titleLabel {
titleView.grid.views?.append(v)
v.grid.rows = nil == detailLabel ? 6 : 4
}
if let v: UILabel = detailLabel {
titleView.grid.views?.append(v)
v.grid.rows = 2
}
width = UIScreen.mainScreen().bounds.width
grid.axis.columns = Int(width / 48)
reloadView() reloadView()
} }
...@@ -147,9 +152,11 @@ public class NavigationBarView : MaterialView { ...@@ -147,9 +152,11 @@ public class NavigationBarView : MaterialView {
reloadView() reloadView()
} }
/** public override func intrinsicContentSize() -> CGSize {
:name: reloadView return CGSizeMake(UIScreen.mainScreen().bounds.width, 64)
*/ }
/// Reloads the view.
public func reloadView() { public func reloadView() {
layoutIfNeeded() layoutIfNeeded()
...@@ -162,7 +169,7 @@ public class NavigationBarView : MaterialView { ...@@ -162,7 +169,7 @@ public class NavigationBarView : MaterialView {
} }
// Size of single grid column. // Size of single grid column.
let g: CGFloat = width / CGFloat(0 < grid.columns ? grid.columns : 1) let g: CGFloat = width / CGFloat(0 < grid.axis.columns ? grid.axis.columns : 1)
grid.views = [] grid.views = []
titleView.grid.columns = grid.axis.columns titleView.grid.columns = grid.axis.columns
...@@ -206,6 +213,7 @@ public class NavigationBarView : MaterialView { ...@@ -206,6 +213,7 @@ public class NavigationBarView : MaterialView {
grid.reloadLayout() grid.reloadLayout()
titleView.grid.views = [] titleView.grid.views = []
titleView.grid.axis.rows = 6
if let v: UILabel = titleLabel { if let v: UILabel = titleLabel {
titleView.grid.views?.append(v) titleView.grid.views?.append(v)
} }
...@@ -216,32 +224,38 @@ public class NavigationBarView : MaterialView { ...@@ -216,32 +224,38 @@ public class NavigationBarView : MaterialView {
} }
/** /**
:name: prepareView Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
when subclassing.
*/ */
public override func prepareView() { public override func prepareView() {
super.prepareView() super.prepareView()
grid.spacing = 10 grid.spacing = 8
grid.axis.columns = 8
grid.axis.inherited = false grid.axis.inherited = false
grid.contentInset.top = 25 grid.contentInset.top = 20
grid.contentInset.left = 10 grid.contentInset.left = 8
grid.contentInset.bottom = 10 grid.contentInset.bottom = 8
grid.contentInset.right = 10 grid.contentInset.right = 8
depth = .Depth1 depth = .Depth1
prepareTextView() prepareTitleView()
} }
public func prepareTextView() { /// Prepares the titleView.
public func prepareTitleView() {
titleView.backgroundColor = nil titleView.backgroundColor = nil
titleView.grid.spacing = 4
titleView.grid.axis.rows = 3
titleView.grid.axis.inherited = false titleView.grid.axis.inherited = false
titleView.grid.axis.direction = .Vertical titleView.grid.axis.direction = .Vertical
addSubview(titleView) addSubview(titleView)
} }
/** /**
:name: prepareProperties Used to trigger property changes that initializers avoid.
- Parameter titleLabel: UILabel for the title.
- Parameter detailLabel: UILabel for the details.
- Parameter leftControls: An Array of UIControls that go on the left side.
- Parameter rightControls: An Array of UIControls that go on the right side.
*/ */
internal func prepareProperties(titleLabel: UILabel?, detailLabel: UILabel?, leftControls: Array<UIControl>?, rightControls: Array<UIControl>?) { internal func prepareProperties(titleLabel: UILabel?, detailLabel: UILabel?, leftControls: Array<UIControl>?, rightControls: Array<UIControl>?) {
self.titleLabel = titleLabel self.titleLabel = titleLabel
......
...@@ -362,7 +362,7 @@ public class TextField : UITextField { ...@@ -362,7 +362,7 @@ public class TextField : UITextField {
prepareView() prepareView()
} }
/// A convenience initializer that is mostly used with AutoLayout. /// A convenience initializer.
public convenience init() { public convenience init() {
self.init(frame: CGRectNull) self.init(frame: CGRectNull)
} }
......
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