add check for single hiding pager
This commit is contained in:
parent
57d7a5f7cc
commit
3286cb4292
@ -193,7 +193,8 @@ open class Carousel: View {
|
||||
/// Sets up the paging molecule
|
||||
open func setupPagingMolecule(_ molecule: (CarouselPagingModelProtocol & MoleculeModelProtocol)?, delegateObject: MVMCoreUIDelegateObject?) {
|
||||
var pagingView: (UIView & CarouselPageControlProtocol)? = nil
|
||||
if let molecule = molecule {
|
||||
if let molecule = molecule,
|
||||
(!molecule.hidesForSinglePage || numberOfPages > 1) {
|
||||
pagingView = MoleculeObjectMapping.shared()?.createMolecule(molecule, delegateObject: delegateObject) as? (UIView & CarouselPageControlProtocol)
|
||||
}
|
||||
|
||||
|
||||
@ -11,4 +11,5 @@ import Foundation
|
||||
|
||||
public protocol CarouselPagingModelProtocol {
|
||||
var position: CGFloat? { get }
|
||||
var hidesForSinglePage: Bool { get }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user