I have added some tap using CAPSPageMenu. Now current index would be 0 always. But i want to know, if i tap on any tap menu.i needs to get to know the index of that.I tried below code . But does't work.

I using this lib : https://github.com/PageMenu/PageMenu/blob/master/README.md

class firstVC: UIViewController,CAPSPageMenuDelegate {
var pageMenu : CAPSPageMenu?
 override func viewDidLoad() {
        super.viewDidLoad()

        pageMenu?.delegate=self
}

func willMoveToPage(_ controller: UIViewController, index: Int){

        print(index)
    }

    func didMoveToPage(_ controller: UIViewController, index: Int){

           print(index)
    }

}

But when i add the breakpoint to this delegate method. it not even coming in to it. Any help in how can i get the index of particular tap when use clicks on that before they move in to another screens.

Thanks

Related posts

Recent Viewed