All Projects → gametimesf → Gtsheet

gametimesf / Gtsheet

Licence: mit
An easy to integrate solution for presenting UIViewControllers in a bottom sheet

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Gtsheet

Meme-Maker-iOS
Meme Maker open source iOS app made in Swift.
Stars: ✭ 59 (-79.08%)
Mutual labels:  apple, iphone
BDLocalizedDevicesModels
Apple devices model names localized.
Stars: ✭ 23 (-91.84%)
Mutual labels:  apple, iphone
NumPad
Number Pad (inspired by Square)
Stars: ✭ 81 (-71.28%)
Mutual labels:  apple, carthage
Framegrabber
📱iOS app to extract full-resolution video frames as images.
Stars: ✭ 237 (-15.96%)
Mutual labels:  apple, iphone
TermiNetwork
🌏 A zero-dependency networking solution for building modern and secure iOS, watchOS, macOS and tvOS applications.
Stars: ✭ 80 (-71.63%)
Mutual labels:  apple, carthage
Watusi For Whatsapp
Your all-in-one tweak for WhatsApp Messenger!
Stars: ✭ 240 (-14.89%)
Mutual labels:  apple, iphone
SwiftUIFormValidator
Declarative form validator for SwiftUI.
Stars: ✭ 34 (-87.94%)
Mutual labels:  apple, carthage
Iboot64helper
IDAPython loader to help with AArch64 iBoot, iBEC, and SecureROM reverse engineering
Stars: ✭ 189 (-32.98%)
Mutual labels:  apple, iphone
punic
Punic is a remote cache CLI built for Carthage and Apple .xcframework
Stars: ✭ 25 (-91.13%)
Mutual labels:  apple, carthage
ios code sign
iOS 签名简介
Stars: ✭ 23 (-91.84%)
Mutual labels:  apple, iphone
Spstorkcontroller
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,494 (+784.4%)
Mutual labels:  apple, transition
Ubottomsheet
iPhone Maps App bottom sheet - A Protocol Oriented Approach
Stars: ✭ 259 (-8.16%)
Mutual labels:  iphone, bottomsheet
Shsearchbar
The search bar that doesn't suck.
Stars: ✭ 206 (-26.95%)
Mutual labels:  apple, carthage
iOS-ARKit
Basic Concepts and Projects using ARKit on iOS.
Stars: ✭ 18 (-93.62%)
Mutual labels:  apple, iphone
Piano
Easily play combinations of sound effects and Taptic Engine vibrations on iOS.
Stars: ✭ 202 (-28.37%)
Mutual labels:  apple, iphone
ALButtonMenu
A simple, fully customizable menu solution for iOS.
Stars: ✭ 45 (-84.04%)
Mutual labels:  apple, iphone
Bender
Easily craft fast Neural Networks on iOS! Use TensorFlow models. Metal under the hood.
Stars: ✭ 1,728 (+512.77%)
Mutual labels:  apple, iphone
Apple Device Model List
All Apple devices model name list. 通过内部编号判断 iOS 设备型号。
Stars: ✭ 149 (-47.16%)
Mutual labels:  apple, iphone
spark-sdk-ios
DEPRECATED Particle iOS Cloud SDK. Use -->
Stars: ✭ 52 (-81.56%)
Mutual labels:  carthage, iphone
SPStorkController
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,515 (+791.84%)
Mutual labels:  apple, transition

No Longer Maintained

GTSheet is no longer used internally at Gametime, as we've migrated our apps to React Native. As such, this repository is no logner maintained or supported.

GTSheet

GTSheet is a a simple, easy to integrate solution for presenting UIViewController in bottom sheet. We handle all the hard work for you-- transitions, gestures, taps and more are all automatically provided by the library. Styling, however, is intentionally left out, allowing you to integrate your own design language with ease.

Installation

Carthage compatible

Carthage

github "gametimesf/GTSheet" == 1.1

Getting Started

The example project included is a great way to try out the features of GTSheet and experiment with some of the more advanced functionality. You can explore integrations for regular a UIViewController, a UIViewController that includes a UIScrollView, such as a UITableViewController. You can also explore a more complex example, using functionality to present a UIViewController above the bottom sheet.

Simple Integration

Getting started is easy. You'll need to conform to at least one protocol on the presented UIViewController. An optional protocol for your presented UIViewController makes presenting a bottom sheet faster and easier.

Required: HalfSheetPresentableProtocol

Implement HalfSheetPresentableProtocol on the UIViewController that you will be presenting in a bottom sheet.

public protocol HalfSheetPresentableProtocol: class {
    weak var managedScrollView: UIScrollView? { get }
    var dismissMethod: [DismissMethod] { get }
    var sheetHeight: CGFloat? { get }
}
public extension HalfSheetPresentableProtocol where Self: UIViewController {
    func didUpdateSheetHeight()
}

1.) managedScrollView provides a scroll view that will be used to trigger dismissal transitions. For example, a UITableViewController should return it's tableView property here.

2.) dismissMethod provides an array of DismissMethod options, such as .swipe, .tap. You may return all, some, or none of these options. When returning an empty set, you will be responsible for dismissing your own UIViewController.

3.) sheetHeight provides the height you would like your bottom sheet to be. UIScrollView subviews will overflow and scroll as expected. On iOS 11, Safe Area insets are automatically respected for you, and added to the total height you return. All HalfSheetPresentableProtocol conforming UIViewControllers are extended with a didUpdateSheetHeight method, which should be called to let the library know that it needs to adjust the height of your bottom sheet.

Optional: HalfSheetPresentingProtocol

Although you can manually instantiate HalfSheetPresentationManager and assign it as your HalfSheetPresentableProtocol's transitioningDelegate, conforming to HalfSheetPresentingProtocol gives your presenting UIViewController several convenience methods for presenting UIViewControllers in a bottom sheet.

public protocol HalfSheetPresentingProtocol: class {
    var transitionManager: HalfSheetPresentationManager! { get set }
}

public extension HalfSheetPresentingProtocol where Self: UIViewController {
    func presentUsingHalfSheet(_ vc: UIViewController, animated: Bool = true)
    @discardableResult func presentUsingHalfSheetInNC(_ vc: UIViewController, animated: Bool = true) -> UINavigationController
}

Advanced Features

HalfSheetCompletionProtocol

Implement this on your presenting UIViewController to receive a callback when your bottom sheet is dismissed.

HalfSheetAppearanceProtocol

Although most styling can be accomplished by using UIAppearance, some advanced changes are simply not possible. This protocol exposes additional styling options that will be handled within the library.

HalfSheetTopVCProviderProtocol

By conforming to this protocol on your presented UIViewController, you are able to provide a UIViewController that will fill the unused space above your bottom sheet.

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