Skip to content

Commit

Permalink
add segment handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuhiro Hayashi committed Jul 17, 2017
1 parent d6d5492 commit c9614d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion iOS Sample/iOS Sample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ class ViewController: UIViewController {
contentViewController?.reloadData(with: 2)
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
menuViewController?.reloadDate()
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
Expand Down Expand Up @@ -60,7 +65,7 @@ extension ViewController: PagingMenuViewControllerDataSource {
}

func menuViewController(viewController: PagingMenuViewController, areaForItemAt index: Int) -> CGFloat {
return viewController.view.bounds.size.width / CGFloat(dataSource.count)
return UIScreen.main.bounds.width / CGFloat(dataSource.count)
}


Expand Down

0 comments on commit c9614d4

Please sign in to comment.