Skip to content
A Drawer implement on SwiftUI
Swift Ruby
Branch: master
Clone or download
Latest commit 5720481 Jul 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Demo Add demo Jul 2, 2019
Example 5.0.0 Jul 2, 2019
SwiftDrawer
.gitignore Initial commit Jun 28, 2019
.travis.yml Initial commit Jun 28, 2019
LICENSE Initial commit Jun 28, 2019
README.md Update README.md Jul 2, 2019
SwiftDrawer.podspec 5.0.0 Jul 2, 2019
_Pods.xcodeproj Initial commit Jun 28, 2019

README.md

SwiftDrawer

CI Status Version License Platform

Demo

list

Use

import SwiftUI
import SwiftDrawer
struct ContentView : View {
    var body: some View {
      Drawer()
        .setSlider(view: SliderView(type: .leftRear))
        .setSlider(view: Slider2View(type: .rightFront))
        .setMain(view: HomeView())
    }
}

Control

  @EnvironmentObject public var drawerControl: DrawerControl


  public func setSlider<Slider: SliderViewProtocol>(view: Slider,
                                                  widthType: SliderWidth = .percent(rate: 0.6),
                                                  shadowRadius: Length = 10)

  public func setMain<Main: View>(view: Main)
  public func show(type: SliderType, isShow: Bool)
  public func hideAllSlider()

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SwiftDrawer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftDrawer'

Author

MillmanY, millmanyang@gmail.com

License

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

You can’t perform that action at this time.