tzef / bmoviewpager Goto Github PK
View Code? Open in Web Editor NEWA ViewPager with NavigationBar component based on UIPageViewController and UICollectionView
License: MIT License
A ViewPager with NavigationBar component based on UIPageViewController and UICollectionView
License: MIT License
Not compatilbe with Swift 5
Hi,
Thank you for your great pod.
I configured it easily and it worked, you mentioned that it supports RTL but I couldn't find the way to make my view RTL.
I just want to know how can I do this.
Thank you again.
IB Designables: Failed to render and update auto layout status for MainPagerViewController (0OZ-tK-gVb): dlopen(BmoViewPager.framework, 1): no suitable image found. Did find:
BmoViewPager.framework: required code signature missing for 'BmoViewPager.framework'
Hello, can you please help me regarding following error.
[!] Unable to find a specification for BmoViewPager (~> 4.0.0)
I have view pager with 2 items. For example, when I move to second item with swipe and then back to first with tapping on it's cell item in view pager navigation bar transition to first page is animating. But when I start to tap on cells items without using swipe gestures pager stops animate page changes. Is there a way to animate page changes in any cases?
i use arabic in app
how to swip from rtl
I have a HomeViewController
in which I have added a BmoViewPager
(not BmoPageViewController
). It works fine and I can get the current page when I scroll with the finger, using delegate methods.
But I've found a strange behavior. I cannot seem to change the page in an animated way. I'm implementing my own UIPageControl
in which I have a target function this way:
@objc func pageControlDidChangePage(_ pageControl: UIPageControl) {
pagerView.presentedPageIndex = pageControl.currentPage
}
So when I tap on the UIPageControl
, the page should change with it. It does change the page, but that change is not animated. How do I make it animated?
There should be a func setPresentedPage(index: Int, animated: Bool = false)
to allow us to animate the change. Or am I missing something?
Thanks!
Hi,
how can I change the title of navigation bar. I need to customise the Title
func bmoViewPagerDataSourceNaviagtionBarItemTitle(_ viewPager: BmoViewPager, navigationBar: BmoViewPagerNavigationBar, forPageListAt page: Int) -> String? {
return "Food (page)"
}
I need to change title based on requirement
when I add the BmoViewPagerNavigationBar to nav titleView, pushed a VC then pop back, the pagerBar did disappeared.
so must add the code to BmoViewPagerNavigationBar.
/// iOS11 navigationItem.titleView
public override var intrinsicContentSize: CGSize {
return frame.size
}
[!] Unable to find a specification for BmoViewPager
If have 10 view controllers. then I select 9th one means, it does't focus current title.
viewPagerNavigationBar.autoFocus = true -> it's support only the page did changed.
help me to fix this.
The property scrollable
on the BmoViewPager
seems to have no effect.
I want to prevent the user to swipe left and right to change the content. That should be possible only with the BmoViewPagerNavigationBar
Any hints?
error when trying to extend BmoViewPager in new version of swift, had to change BmoViewPager definition to open class BmoViewPager instead of public class BmoViewPager
thanks
I would like yo get and set the content offset from the navigation bar to get where is the scroll and sync with another navigation bar
1.how to return current index
2.how to divide the 4 tab equally
thx'
How can I pop viewController on the first page when swipe the screen left?
I want change non-presentedPage titles color when event occured what something like press button.
my goal to inactive all tab viewcontrollers visually without presented(highlighted)
I want to achieve like this:
Have to used Next button which ll move the scroller to other index of controller but unable to do so, Kindly help if there is any thing related this.
Here its what i am doing
import UIKit
import BmoViewPager
class ViewController: UIViewController {
@IBOutlet weak var viewPager: BmoViewPager!
@IBOutlet weak var pageControl: UIPageControl!
weak var BmoDelegate: BmoViewPagerDelegate?
weak var BmoDataSource: BmoViewPagerDataSource?
var globalPage = 0
override func viewDidLoad() {
super.viewDidLoad()
viewPager.delegate = self
viewPager.dataSource = self
}
@IBAction func actionNext(_ sender: Any) {
if self.globalPage < 3 {
self.globalPage += 1
BmoDataSource.bmoViewPagerDataSource(_ viewPager: BmoViewPager, viewControllerForPageAt page: Int) -> UIViewController {
self.globalPage = page
switch self.globalPage {
case 0:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC1") as? VC1 {
return vc
}
case 1:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC2") as? VC2 {
return vc
}
case 2:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC3") as? VC3 {
return vc
}
default:
break
}
return UIViewController()
}
}
}
}
extension ViewController: BmoViewPagerDataSource {
func bmoViewPagerDataSourceNumberOfPage(in viewPager: BmoViewPager) -> Int {
return 3
}
func bmoViewPagerDataSource(_ viewPager: BmoViewPager, viewControllerForPageAt page: Int) -> UIViewController {
self.globalPage = page
switch self.globalPage {
case 0:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC1") as? VC1 {
return vc
}
case 1:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC2") as? VC2 {
return vc
}
case 2:
if let vc = storyboard?.instantiateViewController(withIdentifier: "VC3") as? VC3 {
return vc
}
default:
break
}
return UIViewController()
}
}
extension ViewController: BmoViewPagerDelegate {
func bmoViewPagerDelegate(_ viewPager: BmoViewPager, pageChanged page: Int) {
self.globalPage = page
pageControl.currentPage = self.globalPage
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.