All Projects → horitaku46 → Silentscrolly

horitaku46 / Silentscrolly

Licence: mit
Scroll to hide navigationBar, tabBar and toolBar.

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Silentscrolly

Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+4197.47%)
Mutual labels:  cocoapods, carthage, uiscrollview
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+2077.22%)
Mutual labels:  cocoapods, carthage, uiscrollview
Transitionbutton
UIButton sublass for loading and transition animation.
Stars: ✭ 1,124 (+1322.78%)
Mutual labels:  cocoapods, carthage
Cameramanager
Simple Swift class to provide all the configurations you need to create custom camera view in your app
Stars: ✭ 1,130 (+1330.38%)
Mutual labels:  cocoapods, carthage
Ctshowcase
A simple to use Showcase library that can highlight arbitrary views in an iOS app
Stars: ✭ 73 (-7.59%)
Mutual labels:  cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-12.66%)
Mutual labels:  cocoapods, carthage
Css3colorsswift
A UIColor extension with CSS3 Color names.
Stars: ✭ 62 (-21.52%)
Mutual labels:  cocoapods, carthage
Swiftlinkpreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
Stars: ✭ 1,216 (+1439.24%)
Mutual labels:  cocoapods, carthage
Threadly
Type-safe thread-local storage in Swift
Stars: ✭ 58 (-26.58%)
Mutual labels:  cocoapods, carthage
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1393.67%)
Mutual labels:  cocoapods, carthage
Memorycache
LRU, type-safe, thread-safe memory cache class in Swift
Stars: ✭ 66 (-16.46%)
Mutual labels:  cocoapods, carthage
Notificationz
📡 Helping you own NotificationCenter in Swift!
Stars: ✭ 74 (-6.33%)
Mutual labels:  cocoapods, carthage
Pinpointkit
Send better feedback
Stars: ✭ 1,115 (+1311.39%)
Mutual labels:  cocoapods, carthage
Peep
Easy Sound Generator 🐥
Stars: ✭ 59 (-25.32%)
Mutual labels:  cocoapods, carthage
Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (+1362.03%)
Mutual labels:  cocoapods, carthage
Hcimage Bpg
BPG decoder for iOS and OS X written in Obj-C++.
Stars: ✭ 58 (-26.58%)
Mutual labels:  cocoapods, carthage
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (+1332.91%)
Mutual labels:  cocoapods, carthage
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (+1389.87%)
Mutual labels:  cocoapods, carthage
Mtbbarcodescanner
A lightweight, easy-to-use barcode scanning library for iOS 8+
Stars: ✭ 1,085 (+1273.42%)
Mutual labels:  cocoapods, carthage
Appz
📱 Launch external apps, and deeplink, with ease using Swift!
Stars: ✭ 1,092 (+1282.28%)
Mutual labels:  cocoapods, carthage

Platform Swift Cocoapods Carthage compatible License

Overview

Scroll to hide navigationBar, tabBar and toolBar.

Features

Adding too much UIGestureRecognizer to the UIView makes handling difficult, so it was handled by UIScrollViewDelegate.

Translation

Mr. Gargo translated this README into Russian!🙇‍♂️

Requirements

  • Xcode 9.0+
  • iOS 10+
  • Swift 4.0+

Installation

CocoaPods

pod 'SilentScrolly'

Carthage

github "horitaku46/SilentScrolly"

Usage

See Example, for more details.

《1》 If you want to change the color of the statusBar, add func statusBarStyle(showStyle: UIStatusBarStyle, hideStyle: UIStatusBarStyle) to the UINavigationController.

import UIKit

final class NavigationController: UINavigationController {

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return topViewController?.preferredStatusBarStyle ?? .default
    }
}

《2》 Please describe accordingly as below.

import UIKit

final class TableViewController: UIViewController, SilentScrollable {

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return statusBarStyle(showStyle: .lightContent, hideStyle: .default) // Optional
    }

    @IBOutlet weak var tableView: UITableView! {
        didSet {
            tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
            tableView.delegate = self
            tableView.dataSource = self
        }
    }

    var silentScrolly: SilentScrolly?

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        silentDidLayoutSubviews()
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        configureSilentScrolly(tableView, followBottomView: tabBarController?.tabBar)
    }

    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        silentWillDisappear()
    }

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        silentDidDisappear()
    }

    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransition(to: size, with: coordinator)
        silentWillTranstion()
    }
}

extension TableViewController: UITableViewDelegate {

    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        silentDidScroll()
    }

    func scrollViewDidZoom(_ scrollView: UIScrollView) {
        silentDidZoom() // Optional
    }

    func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
        showNavigationBar() // Optional
        return true
    }
}

extension TableViewController: UITableViewDataSource {

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 100
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
        cell.textLabel?.text = "Row: \(indexPath.row)"
        return cell
    }
}

Author

Takuma Horiuchi

License

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