Comments (9)
@tp
it's not a common scenario. Let's see if someone else ask for it to define if it worth adding it.
Anyway I think you can easily accomplish it by doing:
for row in form.rows {
row.baseCell.userInteractionEnabled = false
}
from eureka.
I too would say this is a 'nice to have' feature. I know it's not too dofficult to do the workaround but still it would look clean if I didn't have to call the baseCell
.
from eureka.
I also think this is a nice to have future. I think this workaround:
for row in form.rows {
row.baseCell.userInteractionEnabled = false
}
is not so good because it disables all kinds of interactions with the row, including scrolling, which is a interaction that a readonly mode should be able to handle.
My workaround for this was:
class ExampleViewController: FormViewController, UITextViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
TextAreaRow.defaultCellSetup = { cell, row in
cell.textView.delegate = self
}
}
func textViewShouldBeginEditing(_ textView: UITextView) -> Bool {
return false
}
}
from eureka.
Not really because if you make row with user interaction == false, then events are not fired, and therefore it cant react to selections...so its not a solution
from eureka.
Thanks this solves the issue nicely and looks exactly as I would expect from a "read-only" mode. :-)
from eureka.
So can you extend read-only to fields as well ?
from eureka.
Not really because if you make row with user interaction == false, then events are not fired, and therefore it cant react to selections...so its not a solution
Hi, did u solve this problem?
from eureka.
I've done some PR, wasnt accepted #1653
from eureka.
I did in this way
form +++ Section("DATA")
<<< TextRow() {
$0.title = "Code"
$0.tag = "Code"
$0.cellSetup { cell, row in
cell.textField.isUserInteractionEnabled = false
}
}.onCellSelection { cell, row in
let codeSectionViewController = CodesTableViewController()
self.navigationController?.pushViewController(codeSectionViewController, animated: true)
}
for my case I need to move to another view controller, to select multiple values and to return the selected rows back, for start I used MultipleSelectorRow, but I had troubles to display my object in MultipleSelectorViewController. For that I disabled the textfield, and each tap is detected by baseCell and it pushes to CodesTableViewController.
Back I sent data through delegate.
I decided to use this way instead to create my CustomMultipleSelectorRow.
from eureka.
Related Issues (20)
- The image of the minus button does not disappear in MultivaluedSection for MultivaluedOptions = [.Insert] HOT 2
- App Store Connect Operation Error: The app references non-public selectors HOT 11
- dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib HOT 2
- Extend cell with another cell
- Section custom header with xib file+class HOT 10
- SegmentedRow crash due to selectedSegmentIndex == -1 HOT 9
- Reordering sections and rows will return the same initial order and not the updated ones HOT 2
- custom Table Inline Row
- SwitchRow Not responding to second time from user interaction HOT 1
- M1 chip Computer + React Native 0.68 + Xcode 14.2 = Compiling Error HOT 1
- Enable BUILD_LIBRARY_FOR_DISTRIBUTION
- Any rule to validate special characters/ numbers in text field in a cell HOT 1
- Food
- How to turn off the capitalization of Section header tiitle? HOT 1
- Bug in iOS 17 Crash app HOT 1
- How to add multivalued .insert options without a multivalued section?
- Index Validation and Safer Collection Handling in Eureka
- Apple privacy manifest file requirement HOT 5
- New release build with privacy manifest HOT 2
- TimeRow Not Using Correct TimeZone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eureka.