Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Error occuring in project #6

@saitejapanditi

Description

@saitejapanditi

untitled
there is an error comming while after somethime the project have runned. i am using the LIHImage slider inside the tableview of every cell present in home viewcontroller present in tabbar. after running the project when i shifted to another item in tabbar the error was occuring "unexpectedly found nil while unwrapping the value" in
@objc func pageSwitchTimer(_ sender: AnyObject) {

    if currentIndex == self.slider.sliderImages.count - 1 {
        self.pageController.setViewControllers([self.contentViewController(atIndex: 0)], direction: UIPageViewControllerNavigationDirection.forward, animated: true, completion: { (complete) -> Void in
            self.currentIndex = 0
        })
    } else {
        **/* here unexpectedly found nil while unwrapping the value. */** self.pageController.setViewControllers([self.contentViewController(atIndex: self.currentIndex+1)], direction: UIPageViewControllerNavigationDirection.forward, animated: true, completion: { (complete) -> Void in 
            self.currentIndex = self.currentIndex + 1
        })
    }
}

please check it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions