hotfix/view-life-cycle-functions-called-multiple-times
Provide public constructor for segment. Provide public getter for current index.
This commit is contained in:
parent
add0442f40
commit
d902fafadf
|
@ -105,6 +105,10 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
layoutController?.delegate = layoutDelegate
|
||||
}
|
||||
}
|
||||
|
||||
public var currentIndex: Int {
|
||||
return paginationController.currentIndex
|
||||
}
|
||||
|
||||
/// If true, when users seleects an iten from menu,
|
||||
/// all view controllers from current index to selected index will be loaded.
|
||||
|
|
|
@ -14,4 +14,9 @@ public struct Segment<SegmentPoint: BasicArithmetic>: ProgressPoint {
|
|||
|
||||
public let first: SegmentPoint
|
||||
public let second: SegmentPoint
|
||||
|
||||
public init(first: SegmentPoint, second: SegmentPoint) {
|
||||
self.first = first
|
||||
self.second = second
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue