PageMenu: Selection indicator won't move
Hello, My issue is the selection indicator won’t move and selected font won’t change if I tap to next item. However the content changes if I tap from the menu, if I swipe the content to show next view controller, it only shows blank view. It works fine on the simulator, but not on real device (tested on iOS 9 & 10). Here’s my code using PageMenu:
for genre in genres! {
let storyboard = UIStoryboard(name: "Home", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "MyViewController") as! MyViewController
vc.title = genre.name!
viewControllers.append(vc)
}
let parameters:[CAPSPageMenuOption] = [
CAPSPageMenuOption.scrollMenuBackgroundColor(Colors.grey95),
CAPSPageMenuOption.selectionIndicatorHeight(2),
CAPSPageMenuOption.selectionIndicatorColor(Colors.fadedRed),
CAPSPageMenuOption.selectedMenuItemLabelColor(Colors.black),
CAPSPageMenuOption.unselectedMenuItemLabelColor(Colors.textGrey),
CAPSPageMenuOption.menuItemFont(Fonts.nexaBold14!),
CAPSPageMenuOption.menuItemSeparatorWidth(0),
CAPSPageMenuOption.menuHeight(44),
CAPSPageMenuOption.menuMargin(0),
CAPSPageMenuOption.menuItemMargin(0),
CAPSPageMenuOption.scrollAnimationDurationOnMenuItemTap(250),
]
pageMenu = CAPSPageMenu(viewControllers: viewControllers, frame: CGRect(x:0,y:64,width:UIScreen.main.bounds.width,height:UIScreen.main.bounds.height-64), pageMenuOptions: parameters)
pageMenu?.delegate = self
self.view.addSubview(pageMenu!.view)
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 15
I encountered the same issue. It was solved by removing Pod and then manually added the CAPSMenu source files.
i found solution removed pod file and put manually file instead of pod it worked
Just try cmd + left arrow and get simulator on landscape mode. And then turn back to portrait. Magic happened to me and it started working again 😃)