8
8
9
9
import UIKit
10
10
11
- open class DQSegmentedControl : UIControl {
11
+ public class DQSegmentedControl : UIControl {
12
12
13
13
//MARK: - Property
14
14
@@ -111,7 +111,7 @@ open class DQSegmentedControl: UIControl {
111
111
private let kBoxLeftOffSet : CGFloat = 6.0
112
112
private let kBoxGapText : CGFloat = 2.0
113
113
114
- override var frame : CGRect {
114
+ override public var frame : CGRect {
115
115
didSet {
116
116
super. frame = frame
117
117
updateSegmentsRect ( )
@@ -146,7 +146,7 @@ open class DQSegmentedControl: UIControl {
146
146
self . isOpaque = false
147
147
}
148
148
149
- override func willMove( toSuperview newSuperview: UIView ? ) {
149
+ override public func willMove( toSuperview newSuperview: UIView ? ) {
150
150
if newSuperview == nil {
151
151
return
152
152
}
@@ -155,12 +155,12 @@ open class DQSegmentedControl: UIControl {
155
155
}
156
156
}
157
157
158
- override func layoutSubviews( ) {
158
+ override public func layoutSubviews( ) {
159
159
super. layoutSubviews ( )
160
160
updateSegmentsRect ( )
161
161
}
162
162
163
- override func draw( _ rect: CGRect ) {
163
+ override public func draw( _ rect: CGRect ) {
164
164
backgroundColor? . setFill ( )
165
165
UIRectFill ( self . bounds)
166
166
selectionIndicatorStripLayer. backgroundColor = selectionIndicatorColor. cgColor
@@ -233,7 +233,7 @@ open class DQSegmentedControl: UIControl {
233
233
234
234
// MARK: - Touch
235
235
236
- override func touchesEnded( _ touches: Set < UITouch > , with event: UIEvent ? ) {
236
+ override public func touchesEnded( _ touches: Set < UITouch > , with event: UIEvent ? ) {
237
237
let touch = ( touches as NSSet ) . anyObject ( ) as AnyObject
238
238
let touchLocation = touch. location ( in: self )
239
239
0 commit comments