xmartlabs /XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.

★ 5,718⑂ 927👁 150⑃ 308● 775▤ 16
Objective-CMITCreated 2014-04-09
下载:4.3.04.3.0 ↓4.3.02021-03-24
+0
日增长
5,718
stars
927
forks
150
watchers
308
prs
775
issues
16
releases

README

!XLForm




If you are working in Swift then you should have a look at [Eureka], a complete re-design of XLForm in Swift and with more features.

We are not implementing any new features for XLForm anymore. However, if a critical issue arises we will fix it.

Purpose
--------------

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. The goal of the library is to get the same power of hand-made forms but spending 1/10 of the time.

XLForm provides a very powerful DSL (Domain Specific Language) used to create a form. It keeps track of this specification on runtime, updating the UI on the fly.

 Let's see the iOS Calendar Event Form created using XLForm


!Screenshot of native Calendar Event Example


What XLForm does
----------------

  Loads a form based on a declarative form definition.
  Keeps track of definition changes on runtime to update the form interface accordingly. Further information on Dynamic Forms section of this readme.
  Supports multivalued sections allowing us to create, delete or reorder rows. For further details see Multivalued Sections section bellow.
  Supports custom rows definition.
  Supports custom selectors. For further details of how to define your own selectors check Custom selectors section out.
  Provides several inline selectors such as date picker and picker inline selectors and brings a way to create custom inline selectors.
  Form data validation based on form definition.
  Ability to easily navigate among rows, fully customizable.
  Ability to show inputAccessoryView if needed. By default a navigation input accessory view is shown.
  Read only mode for a particular row or the entire form.
  Rows can be hidden or shown depending on other rows values. This can be done declaratively using NSPredicates. (see Make a row or section invisible depending on other rows values)



 How to create a form

 Create an instance of XLFormViewController

 Swift

swift
class CalendarEventFormViewController : XLFormViewController {

  required init(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
    self.initializeForm()
  }


  override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
    super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    self.initializeForm()
  }

  func initializeForm() {
    // Implementation details covered in the next section.
  }

}



 Objective-C

objc
import "XLFormViewController.h"

@interface CalendarEventFormViewController: XLFormViewController

@end


objc
@interface ExamplesFormViewController ()

@end

@implementation ExamplesFormViewController

- (instancetype)initWithNibName:(NSString )nibNameOrNil bundle:(NSBundle )nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self){
        [self initializeForm];
    }
    return self;
}

- (id)initWithCoder:(NSCoder )aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self){
        [self initializeForm];
    }
    return

Top issues

Latest release

4.3.0 4.3.0 2021-03-24
Add datePicker style property to XLFormDateCell (1078)

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON