-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFFForm.h
More file actions
40 lines (27 loc) · 1.16 KB
/
FFForm.h
File metadata and controls
40 lines (27 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// FFForm.h
// prophets-ios
//
// Created by Benjamin Roesch on 1/12/13.
// Copyright (c) 2013 Benjamin Roesch. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FFFormField;
@protocol FFFormDelegate
-(void)formAddedField:(FFFormField *)field inSection:(NSUInteger)section atRow:(NSUInteger)row;
-(void)formRemovedFieldFromSection:(NSUInteger)section atRow:(NSInteger)row;
@end
@interface FFForm : NSObject
@property (nonatomic, strong) NSMutableArray *sections;
@property (nonatomic, strong) id object;
@property (nonatomic, weak) id<FFFormDelegate> delegate;
-(id)initWithObject:(id)object sections:(NSArray *)sections;
-(id)initWithObject:(id)object fields:(NSArray *)fields;
+(FFForm *)formForObject:(id)object withFields:(NSArray *)fields;
-(void)initializeFieldValuesFromObject;
-(void)serializeFormFieldValuesIntoObject;
-(void)insertFormField:(FFFormField *)field inSection:(NSUInteger)sectionIndex atRow:(NSUInteger)rowIndex;
-(void)removeFormFieldFromSection:(NSUInteger)sectionIndex atRow:(NSUInteger)rowIndex;
-(void)insertFormField:(FFFormField *)field atRow:(NSUInteger)rowIndex;
-(void)removeFormFieldAtRow:(NSUInteger)rowIndex;
@end