XLForm.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // XLForm.h
  3. // XLForm ( https://github.com/xmartlabs/XLForm )
  4. //
  5. // Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com )
  6. //
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining a copy
  9. // of this software and associated documentation files (the "Software"), to deal
  10. // in the Software without restriction, including without limitation the rights
  11. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. // copies of the Software, and to permit persons to whom the Software is
  13. // furnished to do so, subject to the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be included in
  16. // all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. // THE SOFTWARE.
  25. #import <Foundation/Foundation.h>
  26. //Descriptors
  27. #import "XLFormDescriptor.h"
  28. #import "XLFormRowDescriptor.h"
  29. #import "XLFormSectionDescriptor.h"
  30. // Categories
  31. #import "NSArray+XLFormAdditions.h"
  32. #import "NSExpression+XLFormAdditions.h"
  33. #import "NSObject+XLFormAdditions.h"
  34. #import "NSPredicate+XLFormAdditions.h"
  35. #import "NSString+XLFormAdditions.h"
  36. #import "UIView+XLFormAdditions.h"
  37. //helpers
  38. #import "XLFormOptionsObject.h"
  39. //Controllers
  40. #import "XLFormOptionsViewController.h"
  41. #import "XLFormViewController.h"
  42. //Protocols
  43. #import "XLFormDescriptorCell.h"
  44. #import "XLFormInlineRowDescriptorCell.h"
  45. #import "XLFormRowDescriptorViewController.h"
  46. //Cells
  47. #import "XLFormBaseCell.h"
  48. #import "XLFormButtonCell.h"
  49. #import "XLFormCheckCell.h"
  50. #import "XLFormDateCell.h"
  51. #import "XLFormDatePickerCell.h"
  52. #import "XLFormInlineSelectorCell.h"
  53. #import "XLFormLeftRightSelectorCell.h"
  54. #import "XLFormPickerCell.h"
  55. #import "XLFormRightDetailCell.h"
  56. #import "XLFormRightImageButton.h"
  57. #import "XLFormSegmentedCell.h"
  58. #import "XLFormSelectorCell.h"
  59. #import "XLFormSliderCell.h"
  60. #import "XLFormStepCounterCell.h"
  61. #import "XLFormSwitchCell.h"
  62. #import "XLFormTextFieldCell.h"
  63. #import "XLFormTextViewCell.h"
  64. #import "XLFormImageCell.h"
  65. //Validation
  66. #import "XLFormRegexValidator.h"
  67. extern NSString *const XLFormRowDescriptorTypeAccount;
  68. extern NSString *const XLFormRowDescriptorTypeBooleanCheck;
  69. extern NSString *const XLFormRowDescriptorTypeBooleanSwitch;
  70. extern NSString *const XLFormRowDescriptorTypeButton;
  71. extern NSString *const XLFormRowDescriptorTypeCountDownTimer;
  72. extern NSString *const XLFormRowDescriptorTypeCountDownTimerInline;
  73. extern NSString *const XLFormRowDescriptorTypeDate;
  74. extern NSString *const XLFormRowDescriptorTypeDateInline;
  75. extern NSString *const XLFormRowDescriptorTypeDatePicker;
  76. extern NSString *const XLFormRowDescriptorTypeDateTime;
  77. extern NSString *const XLFormRowDescriptorTypeDateTimeInline;
  78. extern NSString *const XLFormRowDescriptorTypeDecimal;
  79. extern NSString *const XLFormRowDescriptorTypeEmail;
  80. extern NSString *const XLFormRowDescriptorTypeImage;
  81. extern NSString *const XLFormRowDescriptorTypeInfo;
  82. extern NSString *const XLFormRowDescriptorTypeInteger;
  83. extern NSString *const XLFormRowDescriptorTypeMultipleSelector;
  84. extern NSString *const XLFormRowDescriptorTypeMultipleSelectorPopover;
  85. extern NSString *const XLFormRowDescriptorTypeName;
  86. extern NSString *const XLFormRowDescriptorTypeNumber;
  87. extern NSString *const XLFormRowDescriptorTypePassword;
  88. extern NSString *const XLFormRowDescriptorTypePhone;
  89. extern NSString *const XLFormRowDescriptorTypePicker;
  90. extern NSString *const XLFormRowDescriptorTypeSelectorActionSheet;
  91. extern NSString *const XLFormRowDescriptorTypeSelectorAlertView;
  92. extern NSString *const XLFormRowDescriptorTypeSelectorLeftRight;
  93. extern NSString *const XLFormRowDescriptorTypeSelectorPickerView;
  94. extern NSString *const XLFormRowDescriptorTypeSelectorPickerViewInline;
  95. extern NSString *const XLFormRowDescriptorTypeSelectorPopover;
  96. extern NSString *const XLFormRowDescriptorTypeSelectorPush;
  97. extern NSString *const XLFormRowDescriptorTypeSelectorSegmentedControl;
  98. extern NSString *const XLFormRowDescriptorTypeSlider;
  99. extern NSString *const XLFormRowDescriptorTypeStepCounter;
  100. extern NSString *const XLFormRowDescriptorTypeText;
  101. extern NSString *const XLFormRowDescriptorTypeTextView;
  102. extern NSString *const XLFormRowDescriptorTypeTime;
  103. extern NSString *const XLFormRowDescriptorTypeTimeInline;
  104. extern NSString *const XLFormRowDescriptorTypeTwitter;
  105. extern NSString *const XLFormRowDescriptorTypeURL;
  106. extern NSString *const XLFormRowDescriptorTypeZipCode;
  107. #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
  108. #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
  109. #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
  110. #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
  111. #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending