xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.78k stars 1.33k forks source link

Issues overriding navigationAccessoryView #351

Closed DarrenAndes closed 8 years ago

DarrenAndes commented 8 years ago

I am trying to override navigationAccessoryView and w/ (Xcode 7.3 and v. 1.5.0) am now having problems as navigationDone is not a public func so the new #selector cannot resolve it.

navigationAccessoryView.doneButton.action = #selector(FormViewController.navigationDone(_:))

// Need this extension to be changed to:

extension FormViewController { public func navigationDone(sender: UIBarButtonItem) {

mtnbarreto commented 8 years ago

Hi @DarrenAndes, I made this FormViewController methods public: navigateToDirection(direction: Direction)

From there should be simple to set up target action to your inputAccessoryView buttons. Take a look at how Eureka implements them. Its just one line of code each.

Regards

rauanmayemir commented 7 years ago

@mtnbarreto Has anything changed since that time? navigateToDirection only helps with arrow actions, not doneButton.