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
|
@ -106,6 +106,10 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public var currentIndex: Int {
|
||||||
|
return paginationController.currentIndex
|
||||||
|
}
|
||||||
|
|
||||||
/// If true, when users seleects an iten from menu,
|
/// If true, when users seleects an iten from menu,
|
||||||
/// all view controllers from current index to selected index will be loaded.
|
/// 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 first: SegmentPoint
|
||||||
public let second: SegmentPoint
|
public let second: SegmentPoint
|
||||||
|
|
||||||
|
public init(first: SegmentPoint, second: SegmentPoint) {
|
||||||
|
self.first = first
|
||||||
|
self.second = second
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue