All Projects โ†’ jVirus โ†’ Drawer View

jVirus / Drawer View

Licence: mit
๐Ÿ“ค Custom UI component for iOS, replication of Apple's Apple Music player and Shortcutsโ€™ components view [Swift 5.0, iOS 12].

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Drawer View

Swiftautolayout
Write constraints in a concise, expressive, Swifty way.
Stars: โœญ 83 (-38.97%)
Mutual labels:  apple, uikit, autolayout
About Swiftui
Gathering all info published, both by Apple and by others, about new framework SwiftUI.
Stars: โœญ 5,954 (+4277.94%)
Mutual labels:  apple, uikit
Markupkit
Declarative UI for iOS and tvOS
Stars: โœญ 508 (+273.53%)
Mutual labels:  uikit, autolayout
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: โœญ 809 (+494.85%)
Mutual labels:  apple, uikit
WWDC
๐ŸŒˆ ๐–๐–๐ƒ๐‚ ๐’๐ž๐ฌ๐ฌ๐ข๐จ๐ง ๐๐จ๐ญ๐ž๐ฌ ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป โœจ
Stars: โœญ 31 (-77.21%)
Mutual labels:  apple, uikit
Compositional Layouts Kit
๐Ÿ“ A set of advanced compositional layouts for UICollectionView with examples [Swift 5.3, iOS 13].
Stars: โœญ 317 (+133.09%)
Mutual labels:  apple, uikit
Swiftui
A collaborative list of awesome SwiftUI resources. Feel free to contribute!
Stars: โœญ 774 (+469.12%)
Mutual labels:  apple, uikit
ALProgressView
Animated and fully customizable progress view with 2 styles: ring and bar.
Stars: โœญ 72 (-47.06%)
Mutual labels:  apple, uikit
Screenadaptationkit
๐ŸŽจiOS rapidScreen Compatible AdapterKit(Deprecate)
Stars: โœญ 70 (-48.53%)
Mutual labels:  uikit, autolayout
Fruity
Rusty bindings for Apple libraries
Stars: โœญ 72 (-47.06%)
Mutual labels:  apple, uikit
ios ui recipe showcase
iOSใ‚ขใƒ—ใƒช้–‹็™บ - UIๅฎŸ่ฃ…ใงใ‚ใ‚‹ใจๅฌ‰ใ—ใ„ใƒฌใ‚ทใƒ”ใƒ–ใƒƒใ‚ฏๆŽฒ่ผ‰ใ‚ตใƒณใƒ—ใƒซ
Stars: โœญ 54 (-60.29%)
Mutual labels:  uikit, autolayout
Albookcode
Modern Auto Layout Book Sample Code And Solutions
Stars: โœญ 106 (-22.06%)
Mutual labels:  apple, autolayout
LPThumbnailView
A thumbnail view for iOS to give context to multiple images/videos using thumbnails and counter.
Stars: โœญ 54 (-60.29%)
Mutual labels:  apple, uikit
Uicollectionview Layouts Kit
๐Ÿ“ A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: โœญ 410 (+201.47%)
Mutual labels:  uikit, autolayout
ALButtonMenu
A simple, fully customizable menu solution for iOS.
Stars: โœญ 45 (-66.91%)
Mutual labels:  apple, uikit
Color Picker For Ios
Colorful: iOS color picker built with Swift.
Stars: โœญ 709 (+421.32%)
Mutual labels:  uikit, autolayout
ALRadioButtons
RadioButtons for iOS. Inherited from UIControl, support 2 native styles, fully customizable.
Stars: โœญ 65 (-52.21%)
Mutual labels:  apple, uikit
Driftwood
Driftwood is a DSL to make Auto Layout easy on iOS, tvOS and macOS.
Stars: โœญ 14 (-89.71%)
Mutual labels:  uikit, autolayout
Spalert
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
Stars: โœญ 1,014 (+645.59%)
Mutual labels:  apple, uikit
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: โœญ 92 (-32.35%)
Mutual labels:  uikit, autolayout

drawer-view Awesome

Platforms Language Autolayout CocoaPod License

Last Update: 06/April/2019.

If you like the project, please give it a star โญ It will show the creator your appreciation and help others to discover the repo.

โœ๏ธ About

๐Ÿ“ค Drawer View is a custom UI component, replication of Apple's Apple Music player and Shortcuts' components view (also can be seen in Maps app).

๐Ÿ— Installation

CocoaPods

drawer-view is availabe via CocoaPods

pod 'drawer-view', '~> 1.0.4' 

Manual

You can always use copy-paste the sources method ๐Ÿ˜„. Or you can compile the framework and include it with your project.

๐Ÿ“บ Demo

Please wait while the .gif files are loading... (they are about 25Mb)

Drawing

๐Ÿฑ Features

  • Easy to use
    • You only need to instantiate a class called DrawerView and add your UI components.
  • Flexible API
    • Includes a number of customization points that allows to decorate the DrawerView as you'd like.
  • Callbacks
    • You can use built-in callbacks in order to integrate animations or get the state changes.
  • Behavior
    • You may tell the component to close the drawer when the device is rotated or user interacts with the child components.
  • Autolayout
    • You don't need to do anything related to autolayout - the component properly handles all the changes. The only thing you need to do is to add your UI components and make sure that aulayout constraints are properly setup for them.

๐Ÿ“š Code Samples

Instantiation

The most simple instantiation: you only need to provide the superview:

let _ = DrawerView(superView: view)

You can specify how much space will be between top anchor of the DrawerView and the superview by setting topLayoutGuidePadding property and how tall the DrawerView will be when it is closed by setting closedHeight property:

let _ = DrawerView(topLayoutGuidePadding: 100, closedHeight: 82, superView: view)

You can specify blur effect and its type. It will be animated alongside with the drawer view. There are several styles for blur:

let _ = DrawerView(blurStyle: .light, superView: view)

By default the DrawerView will include a visual indicator called LineArrow. LineArrow is an indicator that decorates the view and helps a user with interaction. You can change the properties of the indicator by setting its height, width and color:

let _ = DrawerView(lineArrow: (height: 8, width: 82, color: .black), superView: view)
// Or you can set `nil` in order to turn the indicator off

Properties & Methods

You can change the behavior of the component when a device is rotated. By default the DrawerView will not be closed when a device is rotated. However, you can change this behavior:

drawerView.closeOnRotation = true

You can programmatically change the state of the component:

drawerView.change(state: .open, shouldAnimate: true)

By default, interactions with the child views don't affect the DrawerView anyhow. However, you can change this behavior and allow the DrawerView to be dismissed when one of the child views are interacted:

drawerView.closeOnChildViewTaps = true

There is an animation closure that is used to animate the external components alongside with the DrawerView:

drawerView.animationClosure = { state in
    switch state {
    case .open:
      someOtherView.alpha = 1.0
    case .closed:
      someOtherView.alpha = 0.0
  }
}

You can optionally specify a completion closure that gets called when animation is completed:

drawerView.completionClosure = { state in
  switch state {
    case .open:
      service.launch()
    case .closed:
      service.dismiss()
    }
}

The third and final callback closure can be used to get DrawerViewstate changes:

drawerView.onStateChangeClosure = { state in
  state == .closed ? showDialog() : doNothing()
}

Other settable properties

Also there are many other properties that be customized:

drawerView.cornerRadius = 60
drawerView.animationDuration = 2.5
drawerView.animationDampingRatio = 0.9
drawerView.shadowRadius = 0.25
drawerView.shadowOpacity = 0.132
drawerView.closeOnBlurTapped = true
drawerView.closeOnDrawerTaps = true

๐Ÿ‘จโ€๐Ÿ’ป Author

Astemir Eleev

๐Ÿ”– Licence

The project is available under MIT licence

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