-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to change position of the menu to bottom of screen? #130
Comments
Yes! There is not built in options for that, but you can subclass class CustomPagingView : PagingView {
override func setupConstraints() {
pageView.translatesAutoresizingMaskIntoConstraints = false
collectionView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
pageView.leadingAnchor.constraint(equalTo: leadingAnchor),
pageView.trailingAnchor.constraint(equalTo: trailingAnchor),
pageView.topAnchor.constraint(equalTo: collectionView.topAnchor),
pageView.bottomAnchor.constraint(equalTo: bottomAnchor),
collectionView.leadingAnchor.constraint(equalTo: leadingAnchor),
collectionView.trailingAnchor.constraint(equalTo: trailingAnchor),
collectionView.bottomAnchor.constraint(equalTo: bottomAnchor),
collectionView.heightAnchor.constraint(equalToConstant: options.menuItemSize.height),
])
}
}
class CustomPagingViewController : FixedPagingViewController {
override func loadView() {
view = CustomPagingView(
options: options,
collectionView: collectionView,
pageView: pageViewController.view)
}
} |
Great, thank you! |
how to do this for PagingViewControllerDelegate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to change the position of the menu to the bottom of the screen?
The text was updated successfully, but these errors were encountered: