CooperRS / RMPickerViewController

This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner
MIT License
381 stars 51 forks source link

Cannot invoke initializer for type 'RMPickerViewController' with an argument list of type '(style: RMActionControllerStyle, title: String, message: String, select: RMAction<RMActionController<UIView>>?, andCancel: RMAction<RMActionController<UIView>>?)' #61

Closed nancyPandya closed 7 years ago

nancyPandya commented 7 years ago

Not Working this in swift 3 , when I have converted my code. what issue i am facing?

CooperRS commented 7 years ago

Looks like another declaration issue. The code throwing this issue would help me to tackle the issue here, too 🙂.

nancyPandya commented 7 years ago

When it is converted in Swift 3 just make and must check bridging header files too (If u have dont manually) let selectAction = RMAction(title: "Select", style: .done) { controller in if let pickerController = controller as? RMPickerViewController{ //Your code here } } let cancelAction = RMAction(title: "Cancel", style: .cancel) { _ in print("Row selection was canceled") } let actionController = RMPickerViewController(style: style, title: "", message: "", select: selectAction, andCancel: cancelAction)!