MUSegmentedControl
@IBDesignable
open class MUSegmentedControl : UIControl
Class that act like UISegmentedControl with more customizable options.
-
The object that acts as the delegate of the segmented control.
Declaration
Swift
@IBOutlet public weak var delegate: MUSegmentControlDelegate?
-
The button’s corner radius.
Declaration
Swift
@IBInspectable open dynamic var cornerRadius: CGFloat { get set }
-
The button’s border width.
Declaration
Swift
@IBInspectable open dynamic var borderWidth: CGFloat { get set }
-
Define the font if there is no theme
Declaration
Swift
@objc open dynamic var titleFont: UIFont { get set }
-
Define the title color if there is no theme.
Declaration
Swift
@IBInspectable open dynamic var titleColor: UIColor { get set }
-
Define the selected title color if there is no theme.
Declaration
Swift
@IBInspectable open dynamic var selectedTitleColor: UIColor { get set }
-
Define the selected color if there is no theme.
Declaration
Swift
@IBInspectable open dynamic var selectedColor: UIColor { get set }
-
Define the inset between the indicator and the border.
Declaration
Swift
@IBInspectable open dynamic var indicatorInset: CGFloat { get set }
-
Define the space between each segment.
Declaration
Swift
@IBInspectable open dynamic var segmentSpacing: CGFloat { get set }
-
Define if the user can pan to change the index.
Declaration
Swift
@IBInspectable open dynamic var allowPanningGesture: Bool
-
Returns the number of segments the receiver has.
Declaration
Swift
public var numberOfSegments: Int { get }
-
The index number identifying the selected segment (that is, the last segment touched).
Declaration
Swift
public private(set) var selectedSegmentIndex: Int { get set }
-
The segments available for selection
Declaration
Swift
public var segments: [MUSegmentItem] { get set }
-
Define the current segment index, animated or not.
Declaration
Swift
public func set(index: Int, animated: Bool = false)
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
public override init(frame: CGRect)
-
Returns an object initialized from data in a given unarchiver.
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Initializes and returns a newly allocated view object with a zero frame rectangle.
Declaration
Swift
convenience init()
-
Lays out subviews.
Declaration
Swift
override open func layoutSubviews()
-
The natural size for the receiving view, considering only properties of the view itself.
Declaration
Swift
override open var intrinsicContentSize: CGSize { get }
-
Asks the view if the gesture recognizer should be allowed to continue tracking touch events.
Declaration
Swift
override open func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool