All Projects → floschliep → FLOPageViewController

floschliep / FLOPageViewController

Licence: MIT license
Easy to use Page View Controller for macOS (UIPageViewController for Mac)

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to FLOPageViewController

SimplePagedView
A UIPageViewController replacement built to be as simple as possible
Stars: ✭ 77 (+156.67%)
Mutual labels:  uipageviewcontroller
Tabman
™️ A powerful paging view controller with interactive indicator bars
Stars: ✭ 2,235 (+7350%)
Mutual labels:  uipageviewcontroller
Jxsegmentedview
A powerful and easy to use segmented view (segmentedcontrol, pagingview, pagerview, pagecontrol, categoryview) (腾讯新闻、今日头条、QQ音乐、网易云音乐、京东、爱奇艺、腾讯视频、淘宝、天猫、简书、微博等所有主流APP分类切换滚动视图)
Stars: ✭ 1,905 (+6250%)
Mutual labels:  uipageviewcontroller
Pageboy
📖 A simple, highly informative page view controller
Stars: ✭ 1,652 (+5406.67%)
Mutual labels:  uipageviewcontroller
MCPageViewController
切换滚动视图,MCPageViewController, UIPageViewController
Stars: ✭ 38 (+26.67%)
Mutual labels:  uipageviewcontroller
ScrollAnimationShowcase
[ING] - UIScrollViewやUICollectionViewの特性を活用した表現サンプル
Stars: ✭ 15 (-50%)
Mutual labels:  uipageviewcontroller
ios ui recipe showcase
iOSアプリ開発 - UI実装であると嬉しいレシピブック掲載サンプル
Stars: ✭ 54 (+80%)
Mutual labels:  uipageviewcontroller
MaterialesqueTabBar
UIViewController featuring a customisable Tab Bar working with a UIPageViewController.
Stars: ✭ 17 (-43.33%)
Mutual labels:  uipageviewcontroller

FLOPageViewController

FLOPageViewController is an easy to use page view controller for macOS, similar to UIPageViewController for iOS. It uses NSPageController under the hood, but is much simpler to use and provides customizable UI elements for navigation.

Usage

FLOPageViewController is a subclass of NSViewController and NOT NSPageController. Thus, you can use a FLOPageViewController as your window's content view controller.

Basically, you just need to pass an array of NSViewControllers to your FLOPageViewController instance using the viewControllers property. If you're working with storyboards, you might want to use the loadViewControllers(:from:) convenience method. It will load NSViewControllers from an NSStoryboard using the given identifiers array.

Behavior + Appearance

Page Control

The pageControl is visible by default and supports two different styles, .dot and .circle. Set the showPageControl property to false in order to hide it. If you only want to show it when the mouse is inside, set the pageControlRequiresMouseOver property to true.

To change the size, override the default value of indicatorSize in FLOPageControl.swift.

Arrow Controls

The arrow controls are hidden by default. Set the showArrowControls property to true in order to show them. Arrows will be hidden automatically depending on if there is a previous/next page. If you only want to show them when the mouse is inside, set the arrowControlsRequireMouseOver property to true.

To change the size, change the ArrowSize constant in FLOPageViewController.swift. To change the thickness, override the default value of lineWidth in FLOArrowControl's draw(:) method.

Overlay

By default, all controls will appear above the pages. You can change this behavior by setting the overlayControls property to false. If you do this, you may want to read the pageSize property to be able to size your pages appropriately.

Colors

The tintColor property controls the color of the page indicators and arrow controls. This color should have an alpha value of 1.0.

The (optional) backgroundColor property is the color displayed behind the pages. By default, no color is being displayed.

Gestures

As FLOPageViewController uses NSPageController under the hood, swipe gestures are supported by default.

Requirements + Compatibility

FLOPageViewController requires Swift 4.0. It is compatible with macOS 10.10 and later. I've tested it on 10.10, 10.11, 10.12 and 10.13.

Installation

Download the repository, build the Xcode project and add the FLOPageViewController.framework build product to your project.

Localization

FLOPageViewController supports R-L languages out of the box. In case of an R-L language, the viewControllers array will be reversed and the pageControl's selectedPagewill be set to the last index.

To Do

  • Support for varying page sizes
  • Accessibility support
  • UI tests
  • Properties to change the appearance of the navigation controls

Feel free to create pull requests based on this list or suggest even more improvements.

Contact

Florian Schliep

License

FLOPageViewController is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].