All Projects → hirohisa → Pagecontroller

hirohisa / Pagecontroller

Licence: mit
Infinite paging controller, scrolling through contents and title bar scrolls with a delay

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Pagecontroller

Eachnavigationbar
A custom navigation bar for each view controller.
Stars: ✭ 314 (-8.72%)
Mutual labels:  cocoapods, carthage
Serrata
Slide image viewer library similar to Twitter and LINE.
Stars: ✭ 322 (-6.4%)
Mutual labels:  cocoapods, carthage
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+825%)
Mutual labels:  cocoapods, carthage
Web3.swift
A pure swift Ethereum Web3 library
Stars: ✭ 295 (-14.24%)
Mutual labels:  cocoapods, carthage
Ioniconskit
Use Ionicons in your Swift projects.
Stars: ✭ 310 (-9.88%)
Mutual labels:  cocoapods, carthage
Anyformatkit
Simple text formatting in Swift
Stars: ✭ 296 (-13.95%)
Mutual labels:  cocoapods, carthage
Maplebacon
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations
Stars: ✭ 322 (-6.4%)
Mutual labels:  cocoapods, carthage
Vulcan
Multi image downloader with priority in Swift
Stars: ✭ 291 (-15.41%)
Mutual labels:  cocoapods, carthage
Fwplayer
A video player SDK for iOS, it is based on AVPlayer. https://se.linkedin.com/in/foks-huiwang, https://fokswang.wixsite.com/home
Stars: ✭ 321 (-6.69%)
Mutual labels:  cocoapods, carthage
Xlactioncontroller
Fully customizable and extensible action sheet controller written in Swift
Stars: ✭ 3,228 (+838.37%)
Mutual labels:  cocoapods, carthage
Microfeatures Guidelines
📦📝 uFeatures guidelines
Stars: ✭ 315 (-8.43%)
Mutual labels:  cocoapods, carthage
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+886.92%)
Mutual labels:  cocoapods, carthage
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! 🦊
Stars: ✭ 3,188 (+826.74%)
Mutual labels:  cocoapods, carthage
Misterfusion
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
Stars: ✭ 314 (-8.72%)
Mutual labels:  cocoapods, carthage
Kyshutterbutton
KYShutterButton is a custom button that is similar to the shutter button of the camera app
Stars: ✭ 293 (-14.83%)
Mutual labels:  cocoapods, carthage
Tbuiautotest
Generating UI test label automatically for iOS.
Stars: ✭ 333 (-3.2%)
Mutual labels:  cocoapods, carthage
Swiftprogresshud
📦 SwiftProgressHUD is a user-friendly pure swift HUD. 支持Cocoapods 及 Carthage
Stars: ✭ 290 (-15.7%)
Mutual labels:  cocoapods, carthage
Imageloaderswift
A lightweight and fast image loader for iOS written in Swift.
Stars: ✭ 290 (-15.7%)
Mutual labels:  cocoapods, carthage
Functionkit
A framework for functional types and operations designed to fit naturally into Swift.
Stars: ✭ 302 (-12.21%)
Mutual labels:  cocoapods, carthage
Sclalertview
Beautiful animated Alert View. Written in Objective-C
Stars: ✭ 3,426 (+895.93%)
Mutual labels:  cocoapods, carthage

PageController

Build-Status CocoaPods Carthage compatible license

PageController is infinite paging controller, scrolling through contents and title bar scrolls with a delay. Then it provide user interaction to smoothly and effortlessly moving. It is for iOS written in Swift.

sample

Requirements

PageController Xcode Swift
0.7.x + 9.4 4.1
0.6.x 9.2 4.0
0.5.x 8.2 3.0
0.4.x 8.0 2.2
0.3.x 7.0+ 2.0
0.2.0 6.4 1.2

Features

  • [x] To inherit from DCScrollView
  • [x] Use UIViewController, not UIView like UITabBarController
  • [x] Support AutoLayout about MenuCell
  • [x] Handling to change current view controller with Delegate.
  • [x] Scrolling smoothly and effortlessly
  • [x] Keep to smoothly in scrolling contents

Installation

CocoaPods

pod 'PageController'

Carthage

To integrate PageController into your Xcode project using Carthage, specify it in your Cartfile:

github "hirohisa/PageController" ~> 0.7.1

Usage

viewControllers

Type is [UIViewController], and element must have title.

import PageController

class CustomViewController: PageController {

    override func viewDidLoad() {
        super.viewDidLoad()

        viewControllers = createViewControllers()
    }

    func createViewControllers() -> [UIViewController] {
        let names = [
            "favorites",
            "recents",
            "contacts",
            "history",
            "more",
        ]

        return names.map { name -> UIViewController in
            let viewController = ContentViewController()
            viewController.title = name
            return viewController
        }
    }
}

MenuBar

Enable to change backgroundColor, frame. If you change MenuBarCell.height, then override frameForMenuBar and set height.

/// backgroudColor
menuBar.backgroundColor = UIColor.whiteColor().colorWithAlphaComponent(0.9)
/// skip to auto-select after scrolling
menuBar.isAutoSelectDidEndUserInteractionEnabled = false

/// frame, override this function
override var frameForMenuBar: CGRect {
    let frame = super.frameForMenuBar

    return CGRect(x: frame.minX, y: frame.minY, width: frame.width, height: 60)
}

MenuBarCell

Enable to use Custom Cell supported MenuBarCellable protocol:

public protocol MenuBarCellable {
    var index: Int { get set }
    func setTitle(_ title: String)
    func setHighlighted(_ highlighted: Bool)
    func prepareForReuse()
}

public func register(_ cellClass: MenuBarCellable) {
    guard let cellClass = cellClass as? UIView.Type else { fatalError() }
    self.cellClass = cellClass
}

public func register(_ nib: UINib) {
    self.nib = nib
}

MenuBarCellable

public protocol MenuBarCellable {

    // it's used by PageController
    var index: Int { get set }

    // it is used to set to Label.text, caused by deprecating MenuCell over 0.7
    func setTitle(_ title: String)

    // it's instead of `updateData` over 0.7,
    func setHighlighted(_ highlighted: Bool)

    // Called by the menu bar on creating the instance.
    func prepareForUse()

}

License

PageController is available under the MIT license.

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].