eureka-forms

How to prevent popover from scrolling when Keyboard Appears

ぃ、小莉子 提交于 2020-01-06 06:05:09
问题 I have a form (Eureka form, in a UITableView) that I show in a iPad as a Popover. But when the keyboard appears, the Tableview scrolls down and hides the field that I am editing. Is there a way to prevent that kind of scroll when the popover change their size? Or a way to focus again the field that I am editing? This is the code in the Main View Controller func presentFormPopover(form: FormViewController) { let nav = UINavigationController(rootViewController: form) nav.modalPresentationStyle

How to prevent popover from scrolling when Keyboard Appears

梦想与她 提交于 2020-01-06 06:04:14
问题 I have a form (Eureka form, in a UITableView) that I show in a iPad as a Popover. But when the keyboard appears, the Tableview scrolls down and hides the field that I am editing. Is there a way to prevent that kind of scroll when the popover change their size? Or a way to focus again the field that I am editing? This is the code in the Main View Controller func presentFormPopover(form: FormViewController) { let nav = UINavigationController(rootViewController: form) nav.modalPresentationStyle

Upload Eureka form data to firebase

杀马特。学长 韩版系。学妹 提交于 2020-01-01 19:05:12
问题 I have a user profile that is an Eureka form view. In this space, users can update their profile. If the user clicks 'Save' it calls this function. func saveProfileSettings(){ let userID = user?.uid let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd" let PROFILE_DISPLAY_NAME_REF: NameRow? = form.rowBy(tag: Constants.PROFILE_DISPLAY_NAME) let PROFILE_DISPLAY_NAME = PROFILE_DISPLAY_NAME_REF?.value let PROFILE_EMAIL_REF: EmailRow? = form.rowBy(tag: Constants.PROFILE_EMAIL) let

Get values from Eureka Forms in Swift

别等时光非礼了梦想. 提交于 2019-12-11 00:58:55
问题 I'm new programming in Swift and I'm trying to create a form using Eureka Library. The form is already working but I can't get the data out of the form. I'm trying to get the data one by one store it into a global variable in order to be printed when the button is pressed. The thing is the code is always breaking and I don't know how to correct it. This is my code: import UIKit import Eureka class ViewController: FormViewController { //Creating Global Variables var name: String = "" var data:

Convert from NSDictionary to [String:Any?]

廉价感情. 提交于 2019-12-10 15:55:50
问题 I am using xmartlabs/Eureka to build an app with a dynamic form. In order to fill the form I have to use setValues(values: [String: Any?]) . But I have the form values in an NSDictionary variable and I cannot cast it to [String:Any?] . Is there a way to convert an NSDictionary to [String:Any?] ? 回答1: Hope this helps: let dict = NSDictionary() var anyDict = [String: Any?]() for (value, key) in dict { anyDict[key as! String] = value } 回答2: Just an example: if let content = data["data"] as?

How do you remove the < > (next / previous) Done toolbar in Eureka forms?

社会主义新天地 提交于 2019-12-10 04:37:10
问题 How do I remove the toolbar with " < > Done" on top of the keyboard when a Eureka form row is selected? I'd just like to have the regular keyboard. It isn't clear from the documentation how to do this. Also, what is this toolbar generally referred to as in the iOS documentation? Thank you. 回答1: You must override the following method on your viewController override func inputAccessoryViewForRow(row: BaseRow) -> UIView? and simply return nil there something like this override func

How to present a viewController using a row in Eureka Forms

半腔热情 提交于 2019-12-09 15:44:05
问题 As Eureka is used for creating a new record, which includes different datatypes, one being MediaPicker , I'm wondering how to present its viewController. Which row would do the job? PushRow or ButtonRow Here is my class where I try to create this. import UIKit import MediaPlayer import Eureka public final class MusicRow<T: Equatable> : SelectorRow<T, PushSelectorCell<T>, SelectorViewController<T>>, RowType { public required init(tag: String?) { super.init(tag: tag) presentationMode = .Show

How do you remove the < > (next / previous) Done toolbar in Eureka forms?

不打扰是莪最后的温柔 提交于 2019-12-05 07:45:11
How do I remove the toolbar with " < > Done" on top of the keyboard when a Eureka form row is selected? I'd just like to have the regular keyboard. It isn't clear from the documentation how to do this. Also, what is this toolbar generally referred to as in the iOS documentation? Thank you. You must override the following method on your viewController override func inputAccessoryViewForRow(row: BaseRow) -> UIView? and simply return nil there something like this override func inputAccessoryViewForRow(row: BaseRow) -> UIView? { return nil } Swift 3.0 thanks to @ T.Coutlakis override func

How to present a viewController using a row in Eureka Forms

一笑奈何 提交于 2019-12-04 02:49:23
As Eureka is used for creating a new record, which includes different datatypes, one being MediaPicker , I'm wondering how to present its viewController. Which row would do the job? PushRow or ButtonRow Here is my class where I try to create this. import UIKit import MediaPlayer import Eureka public final class MusicRow<T: Equatable> : SelectorRow<T, PushSelectorCell<T>, SelectorViewController<T>>, RowType { public required init(tag: String?) { super.init(tag: tag) presentationMode = .Show(controllerProvider: ControllerProvider.Callback { return AddMusicViewController(){ _ in } },

How to create custom inline rows with Eureka?

会有一股神秘感。 提交于 2019-12-03 18:05:37
问题 I would like implement a custom inline cell with Eureka like described here. But I have some problems to make in compile in my concrete case. Swift compiler crashes when I try to run with the following error. ... Call parameter type does not match function signature! ... 1. Running pass 'Module Verifier' on function'@_TWaC7TonyPro22ServiceCheckInlineRow26Eureka13InlineRowTypeS_' ... My collapsable Row and Cell. public final class ServiceRow: Row<Service, ServiceCell>, RowType { ... } public