Existing iOS form framework

ぐ巨炮叔叔 提交于 2019-11-26 15:48:03

问题


Hello I am building forms over and over in iPhone and iPad apps:

  • Custom UITableViewCells for labels with input
  • Localization for labels, placeholder text and section headers
  • Validation that marks the cells red or something and does not allow "Submit" if form is incomplete
  • Clicking in the cell activates the editable text box
  • Next / previous buttons
  • Reliable across devices, orientations, iOS versions

I can't imagine I'm the only one doing this. Is there a mature framework or something that can drop in and use? Could you please comment on how you use this library with designs other than vanilla UITableViews with your own colors etc.?


回答1:


Take a look at IBAForms - an open source project from from Itty Bitty Apps. I haven't used it yet myself, however I believe it does most of what you want, except for validation. Here is the github page: IBA Forms

It hasn't been maintained in a while, but if you're looking for a forms library - it's mature and works. At the very least, it could be the starting point for something you take further.

  • Update: There is also Chris Miles' EZForm library, which is very nice.

  • Update #2: Have also started checking out QuickDialog, which seems to be very popular.

  • Update #3: Nick Lockwood has created one called FXForms

  • Update #4: Martin Barreto has created one called XLForm




回答2:


I don't know if this counts as an answer, but i use Sensible Cocoa - Sensible TableView (STV) for this purpose a lot. It's not a "forms" framework (on top of UITableView) as such, but it can be used for this purpose in a very flexible way. It still requires some coding to build a full-fledged form but the UITableView/UITableViewController boilerplate code is reduced to a minimum. Unfortunately the developers bumped the price tag quite high with version 3.0, so i'm actually looking for a STV replacement right now. (I'd stick with STV if it wasn't for the price!)




回答3:


I don't know of anything that combines all those features, but I recently open-sourced my validation library PMValidation on github, which I used developing the iPhone app Imprints. PMValidation comes with many basic types suitable for validating forms, and in fact that's what I originally built it for.

Using the PMValidationManager class you can easily listen to UITextViews or UITextFields, and update whatever graphical widgets you want via notifications. It's very modular and easily extendable, should you have more unique needs. It's under the MIT license.



来源:https://stackoverflow.com/questions/13552422/existing-ios-form-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!