fortmarek / SwipeViewController

SwipeViewController is a Swift modification of RKSwipeBetweenViewControllers - navigate between pages / ViewControllers
MIT License
655 stars 46 forks source link

Crash when I open the VC with the Swipe #36

Open EduardoGin opened 5 years ago

EduardoGin commented 5 years ago

Hello,

So, I access this VC with a segue and it works.

Although, when I tried to make it work with this pod it doesn't open anymore.

This is my VC's code. Am I missing anything?

`class PortfolioDetailsVC: SwipeViewController {

override func viewDidLoad() {
    super.viewDidLoad()

    let pageController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil)
    let navigationController = PortfolioDetailsVC(rootViewController: pageController)

    let stb = UIStoryboard(name: "Main", bundle: nil)
    let pageOne = stb.instantiateViewController(withIdentifier: "PortfolioDetailsVC") as UIViewController
    let pageTwo = stb.instantiateViewController(withIdentifier: "AutoInvestSettingsVC") as UIViewController
    let pageThree = stb.instantiateViewController(withIdentifier: "AutoInvestOverviewVC") as UIViewController

    setViewControllerArray([pageOne])

    pageOne.title = "My AutoInvest"
    pageTwo.title = "AutoInvest Settings"
    pageThree.title = "Overview"

    setFirstViewController(0)
    setNavigationColor(UIColor.blue)
    equalSpaces = true
   setSelectionBar(80, height: 3, color: .black)

}

}`

In the image, the highlight is a navigation bar.

I would love some help.

Thanks Screenshot 2019-04-11 at 09 16 52

fortmarek commented 5 years ago

I wonder if the issue could be because of the top view (that's embedded in what exactly?) - maybe try it in a VC that does not have it? I'm planning to do a rewrite of this, but I'm not sure when I am able to accomplish it.

EduardoGin commented 5 years ago

My navigation bar is inside a view.

If you are talking about the top view, its a View I created solely for that design.

Where I want to tabs to be is on that highlighted navigation bar.