EurekaCommunity / ViewRow

ViewRow is a Eureka row that allows you to display any UIView (or UIView sunclass) within a Eureka row. Views can be created in code or loaded from nib files.
MIT License
77 stars 16 forks source link

Need help. I understand correctly that the method onChange is not implemented? #29

Closed Nikitaxub closed 1 year ago

Nikitaxub commented 1 year ago

ViewRow is not interactive?

alldritt commented 1 year ago

I've never used ViewRow in a way that interacts with Eureka's onChange method. I have embedded UIViews that contained interactive components, but they were self contained. It will be up to you to decide how any interaction with your Eureka form should take place.

Nikitaxub commented 1 year ago

alldritt, thx! I needed a datapicker and a stepper. Community's SplitRow didn't work for me because of visual issues. How can the ViewRow know that there is an interaction with my embedded UIView?

I apologize if my question is stupid and the answer is obvious. I'm trainee.

alldritt commented 1 year ago

If you embed a UIKit Date Picker and Stepper within ViewRow, you need to setup callbacks for each control to handle their value changes. This is done with the addTarget call listening for the valueChanged event. You install a function that is called when the control's value changes. From there, you can pass the control's value along within your application:

https://developer.apple.com/documentation/uikit/uicontrol/1618259-addtarget

Nikitaxub commented 1 year ago

That was very easy. Thank you so much!