-
Notifications
You must be signed in to change notification settings - Fork 75
Home
Welcome to the IBAForms wiki!
-
A “how to set up IBAForms in your project” webcast can be found here: pulkitsinghal.blogspot.com/2011/07/ibaforms-engaging-experience.html
-
The two biggest (most important) foundation classes for using IBAForms are: IBAFormDataSource and IBAFormViewController.
-
The class which extends IBAFormDataSource is supposed to contain the entire layout of the form.
-
Go have a look at SampleFormDataSource class in the example code to get an idea of the many form components and how to lay them out: github.com/ittybittydude/IBAForms/blob/master/samples/IBAFormsShowcase/IBAFormsShowcase/src/datasources/SampleFormDataSource.m
-
The class which extends IBAFormViewController is responsible for allocating a view and table view so that the data source elements may be populated and put on screen. Without doing this you would get a blank/white screen put up!
- (void)loadView { UIView *view = ... UITableView *formTableView = ... ... [self setTableView:formTableView]; [view addSubview:formTableView]; [self setView:view]; }
-
The class which extends IBAFormViewController can either be initialized with its respective IBAFormDataSource:
[[[SampleFormController alloc] initWithNibName:nil bundle:nil formDataSource:sampleFormDataSource] autorelease];
-
Or you can set it later:
- (void)viewDidLoad { [super viewDidLoad]; NSMutableDictionary *aDictionary = [[[NSMutableDictionary alloc] init] autorelease]; ThirdFormDataSource *thirdFormDataSource = [[[ThirdFormDataSource alloc] initWithModel:aDictionary] autorelease]; [self setFormDataSource:thirdFormDataSource]; }
-
So basically, the simplest way to do anything is to create a class of your own that extends IBAFormViewController and create another class of your own that extends IBAFormDataSource. Layout the form programmatically in the data source class. Wire up the data source to the controller and put the controller on display.