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())
}
}
@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()
To run the example project, clone the repo, and run pod install
from the Example directory first.
SwiftDrawer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftDrawer'
MillmanY, millmanyang@gmail.com
SwiftDrawer is available under the MIT license. See the LICENSE file for more info.