Skip to content

Commit

Permalink
Merge branch 'master' into feature/result_builders
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Sep 6, 2023
2 parents e4312e4 + 76de3c2 commit a9fb495
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
Binary file removed Eureka.jpg
Binary file not shown.
Binary file added Eureka.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Eureka: Elegant form builder in Swift](Eureka.jpg)
![Eureka: Elegant form builder in Swift](Eureka.png)

<p align="center">
<a href="https://travis-ci.org/xmartlabs/Eureka"><img src="https://travis-ci.org/xmartlabs/Eureka.svg?branch=master" alt="Build status" /></a>
Expand Down
8 changes: 8 additions & 0 deletions Source/Rows/PickerInlineRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ open class _DoublePickerInlineRow<A, B> : Row<PickerInlineCell<Tuple<A, B>>>, No

/// Options for second component given the selected value from the first component. Will be called often so should be O(1)
public var secondOptions: ((A) -> [B]) = { _ in [] }

/// Modify the displayed values for the first picker row.
public var displayValueForFirstRow: ((A) -> (String)) = { a in return String(describing: a) }

/// Modify the displayed values for the second picker row.
public var displayValueForSecondRow: ((B) -> (String)) = { b in return String(describing: b) }

public var noValueDisplayText: String?

Expand Down Expand Up @@ -140,6 +146,8 @@ public final class DoublePickerInlineRow<A, B> : _DoublePickerInlineRow<A, B>, R
public func setupInlineRow(_ inlineRow: InlineRow) {
inlineRow.firstOptions = firstOptions
inlineRow.secondOptions = secondOptions
inlineRow.displayValueForFirstRow = displayValueForFirstRow
inlineRow.displayValueForSecondRow = displayValueForSecondRow
inlineRow.displayValueFor = self.displayValueFor
inlineRow.cell.height = { UITableView.automaticDimension }
}
Expand Down
7 changes: 6 additions & 1 deletion Source/Rows/TextAreaRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ open class _TextAreaCell<T> : Cell<T>, UITextViewDelegate, AreaCell where T: Equ

super.init(style: style, reuseIdentifier: reuseIdentifier)

let textView = UITextView()
let textView: UITextView
if #available(iOS 16, *) {
textView = UITextView(usingTextLayoutManager: false)
} else {
textView = UITextView()
}
self.textView = textView
textView.translatesAutoresizingMaskIntoConstraints = false
textView.keyboardType = .default
Expand Down

0 comments on commit a9fb495

Please sign in to comment.