Here are some screenshots showing some examples of what you can do with ActionSheetView:
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 10.0+
ActionSheetView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ActionSheetView'
Choose any ViewController you created and implement the protocol 'ActionSheetView':
class MyActionSheetVC: UIViewController,ActionSheetView
Create a class that inherit from 'ASManagerVC':
class MyASManagerVC: ASManagerVC
IMPORTANT: If your 'MyASManagerVC' overrides the method 'viewWillAppear' you have to call 'super.viewWillAppear'.
Choose some class and implement the protocol 'ActionSheetViewDelegate'
class MyDelegate: ActionSheetViewDelegate
Get the instance of your 'ActionSheetViewDelegate' and inform to your 'ASManagerVC':
override func viewDidLoad() {
super.viewDidLoad()
self.delegate = MyDelegate()
}
Create a custom segue from your 'MyASManagerVC' to 'MyActionSheetVC' of class 'ASViewSegue' Choose an identifier and inform it to your 'MyASManagerVC', you can do it on interface builder.
Below you can see all protocols actually available, take a look on methods, each method and parameter has its own doc on project.
public protocol ActionSheetViewDelegate{
func bottomVC(_ vc:UIViewController)
func initialSize()->CGSize
func finalSize()->CGSize
func showDarkBackgroundLayer()->Bool
func darkLayerOpacityForState(_ state:ActionSheetViewState)->Float
}
public protocol ActionSheetView:class {
var controller:ActionSheetViewManager?{get set}
func didChangeToState(_ state:ActionSheetViewState)
func apperanceChangesFor(NewState state:ActionSheetViewState)
func constraintChangesFor(NewState state:ActionSheetViewState)
func uiChangesFor(Progress quant:CGFloat, BigStateProgress big:CGFloat, SmallStateProgress small:CGFloat)
}
public protocol ActionSheetViewManager{
func changeToState(_ state:ActionSheetViewState,Animated animated:Bool)
func reloadActionSheetView()
}
Take a look on Example project and methods documentation.
Create some issue and we can solve it together.
josechagas
ActionSheetView is available under the MIT license. See the LICENSE file for more info.