├── RETableViewManagerExample ├── Podfile ├── Pods │ ├── Target Support Files │ │ ├── Pods-REValidation │ │ │ ├── Pods-REValidation.xcconfig │ │ │ ├── Pods-REValidation-prefix.pch │ │ │ ├── Pods-REValidation-dummy.m │ │ │ └── Pods-REValidation-Private.xcconfig │ │ ├── Pods-RETableViewManager │ │ │ ├── Pods-RETableViewManager.xcconfig │ │ │ ├── Pods-RETableViewManager-prefix.pch │ │ │ ├── Pods-RETableViewManager-dummy.m │ │ │ └── Pods-RETableViewManager-Private.xcconfig │ │ ├── Pods-REFormattedNumberField │ │ │ ├── Pods-REFormattedNumberField.xcconfig │ │ │ ├── Pods-REFormattedNumberField-prefix.pch │ │ │ ├── Pods-REFormattedNumberField-dummy.m │ │ │ └── Pods-REFormattedNumberField-Private.xcconfig │ │ └── Pods │ │ │ ├── Pods-dummy.m │ │ │ ├── Pods.debug.xcconfig │ │ │ ├── Pods.release.xcconfig │ │ │ ├── Pods-environment.h │ │ │ └── Pods-acknowledgements.markdown │ ├── Headers │ │ ├── Build │ │ │ ├── REValidation │ │ │ │ ├── REValidation.h │ │ │ │ ├── REValidator.h │ │ │ │ ├── NSError+REValidation.h │ │ │ │ ├── REURLValidator.h │ │ │ │ ├── REEmailValidator.h │ │ │ │ ├── RELengthValidator.h │ │ │ │ └── REPresenceValidator.h │ │ │ ├── RETableViewManager │ │ │ │ ├── REActionBar.h │ │ │ │ ├── REBoolItem.h │ │ │ │ ├── RETextItem.h │ │ │ │ ├── REFloatItem.h │ │ │ │ ├── RENumberItem.h │ │ │ │ ├── REPickerItem.h │ │ │ │ ├── RERadioItem.h │ │ │ │ ├── RETableViewCell.h │ │ │ │ ├── RETableViewItem.h │ │ │ │ ├── REDateTimeItem.h │ │ │ │ ├── RELongTextItem.h │ │ │ │ ├── RESegmentedItem.h │ │ │ │ ├── RETableViewManager.h │ │ │ │ ├── RETableViewSection.h │ │ │ │ ├── RECreditCardItem.h │ │ │ │ ├── RETableViewCellStyle.h │ │ │ │ ├── REInlinePickerItem.h │ │ │ │ ├── REMultipleChoiceItem.h │ │ │ │ ├── REPlaceholderTextView.h │ │ │ │ ├── RETableViewBoolCell.h │ │ │ │ ├── RETableViewFloatCell.h │ │ │ │ ├── RETableViewTextCell.h │ │ │ │ ├── REInlineDatePickerItem.h │ │ │ │ ├── RETableViewNumberCell.h │ │ │ │ ├── RETableViewOptionCell.h │ │ │ │ ├── RETableViewPickerCell.h │ │ │ │ ├── RETableViewCreditCardCell.h │ │ │ │ ├── RETableViewDateTimeCell.h │ │ │ │ ├── RETableViewLongTextCell.h │ │ │ │ ├── RETableViewOptionsController.h │ │ │ │ ├── RETableViewSegmentedCell.h │ │ │ │ ├── RETableViewInlinePickerCell.h │ │ │ │ ├── RETableViewInlineDatePickerCell.h │ │ │ │ └── NSString+RETableViewManagerAdditions.h │ │ │ └── REFormattedNumberField │ │ │ │ ├── NSString+RENumberFormat.h │ │ │ │ └── REFormattedNumberField.h │ │ └── Public │ │ │ ├── REValidation │ │ │ ├── REValidation.h │ │ │ ├── REValidator.h │ │ │ ├── NSError+REValidation.h │ │ │ ├── REURLValidator.h │ │ │ ├── REEmailValidator.h │ │ │ ├── RELengthValidator.h │ │ │ └── REPresenceValidator.h │ │ │ ├── RETableViewManager │ │ │ ├── REActionBar.h │ │ │ ├── REBoolItem.h │ │ │ ├── REFloatItem.h │ │ │ ├── RENumberItem.h │ │ │ ├── REPickerItem.h │ │ │ ├── RERadioItem.h │ │ │ ├── RETableViewCell.h │ │ │ ├── RETableViewItem.h │ │ │ ├── RETextItem.h │ │ │ ├── REDateTimeItem.h │ │ │ ├── RELongTextItem.h │ │ │ ├── RECreditCardItem.h │ │ │ ├── RESegmentedItem.h │ │ │ ├── RETableViewCellStyle.h │ │ │ ├── RETableViewManager.h │ │ │ ├── RETableViewSection.h │ │ │ ├── REInlinePickerItem.h │ │ │ ├── REPlaceholderTextView.h │ │ │ ├── RETableViewBoolCell.h │ │ │ ├── RETableViewTextCell.h │ │ │ ├── REInlineDatePickerItem.h │ │ │ ├── REMultipleChoiceItem.h │ │ │ ├── RETableViewFloatCell.h │ │ │ ├── RETableViewNumberCell.h │ │ │ ├── RETableViewOptionCell.h │ │ │ ├── RETableViewPickerCell.h │ │ │ ├── RETableViewDateTimeCell.h │ │ │ ├── RETableViewLongTextCell.h │ │ │ ├── RETableViewSegmentedCell.h │ │ │ ├── RETableViewCreditCardCell.h │ │ │ ├── RETableViewInlinePickerCell.h │ │ │ ├── RETableViewOptionsController.h │ │ │ ├── RETableViewInlineDatePickerCell.h │ │ │ └── NSString+RETableViewManagerAdditions.h │ │ │ └── REFormattedNumberField │ │ │ ├── REFormattedNumberField.h │ │ │ └── NSString+RENumberFormat.h │ ├── REFormattedNumberField │ │ ├── REFormattedNumberField │ │ │ ├── NSString+RENumberFormat.h │ │ │ ├── REFormattedNumberField.h │ │ │ └── NSString+RENumberFormat.m │ │ └── LICENSE │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── RETableViewManager.podspec │ └── REValidation │ │ ├── LICENSE │ │ └── REValidation │ │ ├── Validators │ │ ├── REURLValidator.h │ │ ├── REEmailValidator.h │ │ ├── RELengthValidator.h │ │ ├── REPresenceValidator.h │ │ ├── REPresenceValidator.m │ │ ├── REEmailValidator.m │ │ ├── REURLValidator.m │ │ └── RELengthValidator.m │ │ ├── NSError+REValidation.h │ │ ├── NSError+REValidation.m │ │ ├── REValidator.h │ │ ├── REValidation.h │ │ └── REValidator.m ├── RETableViewManagerExample │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Default.png │ ├── Default@2x.png │ ├── Default-568h@2x.png │ ├── Default-667h@2x.png │ ├── Default-736h@3x.png │ ├── Photos │ │ ├── photo1.jpg │ │ ├── photo2.jpg │ │ ├── photo3.jpg │ │ ├── photo4.jpg │ │ ├── photo5.jpg │ │ ├── photo6.jpg │ │ ├── userpic1.jpg │ │ ├── userpic2.jpg │ │ ├── userpic3.jpg │ │ ├── userpic4.jpg │ │ ├── userpic5.jpg │ │ └── userpic6.jpg │ ├── Resources │ │ ├── Last@2x.png │ │ ├── First@2x.png │ │ ├── Heart@2x.png │ │ ├── Middle@2x.png │ │ ├── Single@2x.png │ │ ├── First_Alt@2x.png │ │ ├── Last_Alt@2x.png │ │ ├── Middle_Alt@2x.png │ │ ├── Single_Alt@2x.png │ │ ├── First_Selected@2x.png │ │ ├── Last_Selected@2x.png │ │ ├── Heart_Highlighted@2x.png │ │ ├── Middle_Selected@2x.png │ │ └── Single_Selected@2x.png │ ├── Classes │ │ ├── Models │ │ │ ├── XIBTestItem.m │ │ │ ├── XIBTestItem.h │ │ │ ├── MultilineTextItem.m │ │ │ ├── MultilineTextItem.h │ │ │ ├── ListImageItem.h │ │ │ └── ListImageItem.m │ │ ├── Controllers │ │ │ ├── ListViewController.h │ │ │ ├── IndexedListViewController.h │ │ │ ├── RetractableViewController.h │ │ │ ├── ValidationsViewController.h │ │ │ ├── RootViewController.h │ │ │ ├── XIBTestViewController.h │ │ │ ├── StylingViewController.h │ │ │ ├── EditingViewController.h │ │ │ ├── ControlsViewController.h │ │ │ ├── IndexedListViewController.m │ │ │ ├── XIBTestViewController.m │ │ │ ├── RetractableViewController.m │ │ │ └── ListViewController.m │ │ └── Views │ │ │ ├── XIBTestCell.m │ │ │ ├── XIBTestCell.h │ │ │ ├── ListImageCell.h │ │ │ ├── MultilineTextCell.h │ │ │ ├── ListHeaderView.h │ │ │ ├── ListImageCell.m │ │ │ ├── ListHeaderView.m │ │ │ └── MultilineTextCell.m │ ├── AppDelegate.h │ ├── main.m │ ├── RETableViewManagerExample-Prefix.pch │ ├── AppDelegate.m │ └── RETableViewManagerExample-Info.plist ├── RETableViewManagerExample.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── RETableViewManagerExample.xcworkspace │ └── contents.xcworkspacedata └── Podfile.lock ├── Screenshot1.png ├── Screenshot2.png ├── Screenshot3.png ├── Documentation ├── html │ ├── img │ │ ├── disclosure.png │ │ ├── disclosure_open.png │ │ ├── title_background.png │ │ ├── library_background.png │ │ └── button_bar_background.png │ ├── css │ │ └── stylesPrint.css │ ├── hierarchy.html │ └── index.html └── appedoc_command.txt ├── RETableViewManager ├── Resources │ ├── Card_Amex.png │ ├── Card_Back.png │ ├── Card_Stack.png │ ├── Card_Visa.png │ ├── Card_Amex@2x.png │ ├── Card_Back@2x.png │ ├── Card_Discover.png │ ├── Card_Stack@2x.png │ ├── Card_Visa@2x.png │ ├── Card_Mastercard.png │ ├── Ribbon_Expired.png │ ├── Transparent@2x.png │ ├── Card_Discover@2x.png │ ├── Card_Mastercard@2x.png │ ├── Ribbon_Expired@2x.png │ ├── UIButtonBarArrowLeft.png │ ├── UIButtonBarArrowLeft@2x.png │ ├── UIButtonBarArrowRight.png │ └── UIButtonBarArrowRight@2x.png ├── NSBundle+RETableViewManager.h ├── Cells │ ├── RETableViewInlineDatePickerCell.h │ ├── RETableViewInlinePickerCell.h │ ├── RETableViewBoolCell.h │ ├── RETableViewFloatCell.h │ ├── RETableViewOptionCell.h │ ├── RETableViewNumberCell.h │ ├── RETableViewTextCell.h │ ├── RETableViewLongTextCell.h │ ├── RETableViewSegmentedCell.h │ ├── RETableViewPickerCell.h │ ├── RETableViewDateTimeCell.h │ └── RETableViewCreditCardCell.h ├── Items │ ├── REInlinePickerItem.h │ ├── REInlineDatePickerItem.h │ ├── REInlinePickerItem.m │ ├── REInlineDatePickerItem.m │ ├── RELongTextItem.h │ ├── RENumberItem.h │ ├── RERadioItem.h │ ├── REMultipleChoiceItem.h │ ├── REBoolItem.h │ ├── RENumberItem.m │ ├── REFloatItem.h │ ├── REPickerItem.h │ ├── REPickerItem.m │ ├── RELongTextItem.m │ ├── RETextItem.m │ ├── REDateTimeItem.m │ ├── REBoolItem.m │ ├── REFloatItem.m │ ├── RECreditCardItem.h │ ├── RERadioItem.m │ ├── REMultipleChoiceItem.m │ ├── RECreditCardItem.m │ ├── RESegmentedItem.h │ ├── REDateTimeItem.h │ └── RESegmentedItem.m ├── NSBundle+RETableViewManager.m ├── NSString+RETableViewManagerAdditions.h ├── REPlaceholderTextView.h ├── REActionBar.h ├── RETableViewOptionsController.h └── RETableViewCellStyle.h ├── RETableViewManager.podspec └── LICENSE /RETableViewManagerExample/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | pod 'RETableViewManager', :path => '../' -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REValidation/Pods-REValidation.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Screenshot1.png -------------------------------------------------------------------------------- /Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Screenshot2.png -------------------------------------------------------------------------------- /Screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Screenshot3.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-RETableViewManager/Pods-RETableViewManager.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REFormattedNumberField/Pods-REFormattedNumberField.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/REValidation.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/REValidation.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/REValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/REValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/REValidation.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/REValidation.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/REValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/REValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REActionBar.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/REActionBar.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REBoolItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REBoolItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETextItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RETextItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REActionBar.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/REActionBar.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REFloatItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REFloatItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RENumberItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RENumberItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REPickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REPickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RERadioItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RERadioItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REBoolItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REBoolItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REFloatItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REFloatItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RENumberItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RENumberItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REPickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REPickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RERadioItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RERadioItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETextItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RETextItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REDateTimeItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REDateTimeItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RELongTextItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RELongTextItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RESegmentedItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RESegmentedItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewManager.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewManager.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewSection.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewSection.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/NSError+REValidation.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/NSError+REValidation.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/REURLValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REURLValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REDateTimeItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REDateTimeItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RELongTextItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RELongTextItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/NSError+REValidation.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/NSError+REValidation.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/REURLValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REURLValidator.h -------------------------------------------------------------------------------- /Documentation/html/img/disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Documentation/html/img/disclosure.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RECreditCardItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RECreditCardItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewCellStyle.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewCellStyle.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/REEmailValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REEmailValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/RELengthValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/RELengthValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RECreditCardItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RECreditCardItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RESegmentedItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/RESegmentedItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewCellStyle.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewCellStyle.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewManager.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewManager.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewSection.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewSection.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/REEmailValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REEmailValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/RELengthValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/RELengthValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REInlinePickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REInlinePickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REMultipleChoiceItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REMultipleChoiceItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REPlaceholderTextView.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/REPlaceholderTextView.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewBoolCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewBoolCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewFloatCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewFloatCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewTextCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REValidation/REPresenceValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REPresenceValidator.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REInlinePickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REInlinePickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REPlaceholderTextView.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/REPlaceholderTextView.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewBoolCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewBoolCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewTextCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REValidation/REPresenceValidator.h: -------------------------------------------------------------------------------- 1 | ../../../REValidation/REValidation/Validators/REPresenceValidator.h -------------------------------------------------------------------------------- /Documentation/html/img/disclosure_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Documentation/html/img/disclosure_open.png -------------------------------------------------------------------------------- /Documentation/html/img/title_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Documentation/html/img/title_background.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Amex.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Back.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Stack.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Visa.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/REInlineDatePickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REInlineDatePickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewNumberCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewNumberCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewOptionCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewOptionCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewPickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewPickerCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REInlineDatePickerItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REInlineDatePickerItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/REMultipleChoiceItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Items/REMultipleChoiceItem.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewFloatCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewFloatCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewNumberCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewNumberCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewOptionCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewOptionCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewPickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewPickerCell.h -------------------------------------------------------------------------------- /Documentation/html/img/library_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Documentation/html/img/library_background.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Amex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Amex@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Back@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Discover.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Stack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Stack@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Visa@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Visa@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewCreditCardCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewCreditCardCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewDateTimeCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewDateTimeCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewLongTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewLongTextCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewOptionsController.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewOptionsController.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewSegmentedCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewSegmentedCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewDateTimeCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewDateTimeCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewLongTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewLongTextCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewSegmentedCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewSegmentedCell.h -------------------------------------------------------------------------------- /Documentation/html/img/button_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/Documentation/html/img/button_bar_background.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Mastercard.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Ribbon_Expired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Ribbon_Expired.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Transparent@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Transparent@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewInlinePickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewInlinePickerCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewCreditCardCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewCreditCardCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewInlinePickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewInlinePickerCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewOptionsController.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/RETableViewOptionsController.h -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Discover@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Discover@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Card_Mastercard@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Card_Mastercard@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/Ribbon_Expired@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/Ribbon_Expired@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/UIButtonBarArrowLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/UIButtonBarArrowLeft.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REFormattedNumberField/NSString+RENumberFormat.h: -------------------------------------------------------------------------------- 1 | ../../../REFormattedNumberField/REFormattedNumberField/NSString+RENumberFormat.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/REFormattedNumberField/REFormattedNumberField.h: -------------------------------------------------------------------------------- 1 | ../../../REFormattedNumberField/REFormattedNumberField/REFormattedNumberField.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/RETableViewInlineDatePickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewInlineDatePickerCell.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REFormattedNumberField/REFormattedNumberField.h: -------------------------------------------------------------------------------- 1 | ../../../REFormattedNumberField/REFormattedNumberField/REFormattedNumberField.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/RETableViewInlineDatePickerCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/Cells/RETableViewInlineDatePickerCell.h -------------------------------------------------------------------------------- /RETableViewManager/Resources/UIButtonBarArrowLeft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/UIButtonBarArrowLeft@2x.png -------------------------------------------------------------------------------- /RETableViewManager/Resources/UIButtonBarArrowRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/UIButtonBarArrowRight.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Build/RETableViewManager/NSString+RETableViewManagerAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/NSString+RETableViewManagerAdditions.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/REFormattedNumberField/NSString+RENumberFormat.h: -------------------------------------------------------------------------------- 1 | ../../../REFormattedNumberField/REFormattedNumberField/NSString+RENumberFormat.h -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Headers/Public/RETableViewManager/NSString+RETableViewManagerAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../../../RETableViewManager/NSString+RETableViewManagerAdditions.h -------------------------------------------------------------------------------- /RETableViewManager/Resources/UIButtonBarArrowRight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManager/Resources/UIButtonBarArrowRight@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Default.png -------------------------------------------------------------------------------- /Documentation/appedoc_command.txt: -------------------------------------------------------------------------------- 1 | appledoc --project-name RETableViewManager --project-company 'Roman Efimov' --company-id com.romanefimov --output Documentation --no-create-docset RETableViewManager -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REValidation/Pods-REValidation-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Default@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-RETableViewManager/Pods-RETableViewManager-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Default-568h@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Default-667h@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Default-736h@3x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo1.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo2.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo3.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo4.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo5.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/photo6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/photo6.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic1.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic2.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic3.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic4.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic5.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Photos/userpic6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Photos/userpic6.jpg -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Last@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Last@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REFormattedNumberField/Pods-REFormattedNumberField-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/First@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/First@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Heart@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Heart@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Middle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Middle@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Single@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Single@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/First_Alt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/First_Alt@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Last_Alt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Last_Alt@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Middle_Alt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Middle_Alt@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Single_Alt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Single_Alt@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/First_Selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/First_Selected@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Last_Selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Last_Selected@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Heart_Highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Heart_Highlighted@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Middle_Selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Middle_Selected@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Resources/Single_Selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romaonthego/RETableViewManager/HEAD/RETableViewManagerExample/RETableViewManagerExample/Resources/Single_Selected@2x.png -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REValidation/Pods-REValidation-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_REValidation : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_REValidation 5 | @end 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-RETableViewManager/Pods-RETableViewManager-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RETableViewManager : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RETableViewManager 5 | @end 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REFormattedNumberField/Pods-REFormattedNumberField-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_REFormattedNumberField : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_REFormattedNumberField 5 | @end 6 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RETableViewManager/NSBundle+RETableViewManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewManagerBundle.h 3 | // Pods 4 | // 5 | // Created by Kel Bucey on 3/3/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (RETableViewManager) 12 | 13 | + (instancetype)RETableViewManagerBundle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/XIBTestItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestItem.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "XIBTestItem.h" 10 | 11 | @implementation XIBTestItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/XIBTestItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestItem.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewItem.h" 10 | 11 | @interface XIBTestItem : RETableViewItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/MultilineTextItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // MultilineTextItem.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 9/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "MultilineTextItem.h" 10 | 11 | @implementation MultilineTextItem 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/MultilineTextItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultilineTextItem.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 9/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewItem.h" 10 | 11 | @interface MultilineTextItem : RETableViewItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 2/28/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/ListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ListViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 3/17/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface ListViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Documentation/html/css/stylesPrint.css: -------------------------------------------------------------------------------- 1 | 2 | header { 3 | display: none; 4 | } 5 | 6 | div.main-navigation, div.navigation-top { 7 | display: none; 8 | } 9 | 10 | div#overview_contents, div#contents.isShowingTOC, div#contents { 11 | overflow: visible; 12 | position: relative; 13 | top: 0px; 14 | border: none; 15 | left: 0; 16 | } 17 | #tocContainer.isShowingTOC { 18 | display: none; 19 | } 20 | nav { 21 | display: none; 22 | } -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/IndexedListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IndexedListViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/14/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface IndexedListViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/RetractableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RetractableViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 6/4/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface RetractableViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/ValidationsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ValidationsViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/22/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface ValidationsViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 2/28/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface RootViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/XIBTestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RETableViewManager.h" 11 | 12 | @interface XIBTestViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/StylingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // StylingViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 6/13/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ControlsViewController.h" 11 | 12 | @interface StylingViewController : ControlsViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REFormattedNumberField/REFormattedNumberField/NSString+RENumberFormat.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RENumberFormat.h 3 | // REFormattedNumberFieldExample 4 | // 5 | // Created by Roman Efimov on 9/13/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (RENumberFormat) 12 | 13 | - (NSString *)re_stringWithNumberFormat:(NSString *)format; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/EditingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EditingViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/13/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface EditingViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 2/28/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/RETableViewManagerExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RETableViewManagerExample' target in the 'RETableViewManagerExample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewInlineDatePickerCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewInlineDatePickerCell.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/4/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewCell.h" 10 | #import "REInlineDatePickerItem.h" 11 | 12 | @interface RETableViewInlineDatePickerCell : RETableViewCell 13 | 14 | @property (strong, readwrite, nonatomic) REInlineDatePickerItem *item; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REValidation/Pods-REValidation-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-REValidation.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/REValidation" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/REFormattedNumberField" "${PODS_ROOT}/Headers/Public/RETableViewManager" "${PODS_ROOT}/Headers/Public/REValidation" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/ListImageItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // ListImageItem.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewItem.h" 10 | 11 | @interface ListImageItem : RETableViewItem 12 | 13 | @property (copy, readwrite, nonatomic) NSString *imageName; 14 | 15 | + (ListImageItem *)itemWithImageNamed:(NSString *)imageName; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/XIBTestCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestCell.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "XIBTestCell.h" 10 | 11 | @implementation XIBTestCell 12 | 13 | - (void)cellWillAppear 14 | { 15 | [super cellWillAppear]; 16 | self.textLabel.text = @""; 17 | self.testLabel.text = self.testItem.title; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewInlinePickerCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewInlinePickerCell.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/5/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewCell.h" 10 | #import "REInlinePickerItem.h" 11 | 12 | @interface RETableViewInlinePickerCell : RETableViewCell 13 | 14 | @property (strong, readwrite, nonatomic) REInlinePickerItem *item; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-RETableViewManager/Pods-RETableViewManager-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-RETableViewManager.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/RETableViewManager" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/REFormattedNumberField" "${PODS_ROOT}/Headers/Public/RETableViewManager" "${PODS_ROOT}/Headers/Public/REValidation" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/XIBTestCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestCell.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewCell.h" 10 | #import "XIBTestItem.h" 11 | 12 | @interface XIBTestCell : RETableViewCell 13 | 14 | @property (strong, readwrite, nonatomic) IBOutlet UILabel *testLabel; 15 | @property (strong, readwrite, nonatomic) XIBTestItem *testItem; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods-REFormattedNumberField/Pods-REFormattedNumberField-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-REFormattedNumberField.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/REFormattedNumberField" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/REFormattedNumberField" "${PODS_ROOT}/Headers/Public/RETableViewManager" "${PODS_ROOT}/Headers/Public/REValidation" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Models/ListImageItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // ListImageItem.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "ListImageItem.h" 10 | 11 | @implementation ListImageItem 12 | 13 | + (ListImageItem *)itemWithImageNamed:(NSString *)imageName 14 | { 15 | ListImageItem *item = [[ListImageItem alloc] init]; 16 | item.imageName = imageName; 17 | return item; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListImageCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ListImageCell.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ListImageItem.h" 11 | 12 | @interface ListImageCell : RETableViewCell 13 | 14 | @property (strong, readonly, nonatomic) UIImageView *pictureView; 15 | @property (strong, readwrite, nonatomic) ListImageItem *imageItem; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REInlinePickerItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REInlinePickerItem.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/5/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewItem.h" 10 | 11 | @class REPickerItem; 12 | 13 | @interface REInlinePickerItem : RETableViewItem 14 | 15 | @property (weak, readwrite, nonatomic) REPickerItem *pickerItem; 16 | 17 | + (instancetype)itemWithPickerItem:(REPickerItem *)pickerItem; 18 | - (id)initWithPickerItem:(REPickerItem *)pickerItem; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/MultilineTextCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultilineTextCell.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 9/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MultilineTextItem.h" 11 | 12 | @interface MultilineTextCell : RETableViewCell 13 | 14 | @property (strong, readwrite, nonatomic) MultilineTextItem *textItem; 15 | @property (strong, readonly, nonatomic) UILabel *multilineLabel; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REInlineDatePickerItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REInlineDatePickerItem.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/4/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RETableViewItem.h" 10 | 11 | @class REDateTimeItem; 12 | 13 | @interface REInlineDatePickerItem : RETableViewItem 14 | 15 | @property (weak, readwrite, nonatomic) REDateTimeItem *dateTimeItem; 16 | 17 | + (instancetype)itemWithDateTimeItem:(REDateTimeItem *)dateTimeItem; 18 | - (id)initWithDateTimeItem:(REDateTimeItem *)dateTimeItem; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ListHeaderView.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ListHeaderView : UIView 12 | 13 | @property (strong, readonly, nonatomic) UIImageView *userpicImageView; 14 | @property (strong, readonly, nonatomic) UILabel *usernameLabel; 15 | 16 | + (ListHeaderView *)headerViewWithImageNamed:(NSString *)imageName username:(NSString *)username; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - REFormattedNumberField (1.1.5) 3 | - RETableViewManager (1.5.14): 4 | - REFormattedNumberField (~> 1.1.5) 5 | - REValidation (~> 0.1.4) 6 | - REValidation (0.1.4) 7 | 8 | DEPENDENCIES: 9 | - RETableViewManager (from `../`) 10 | 11 | EXTERNAL SOURCES: 12 | RETableViewManager: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | REFormattedNumberField: 86318c549b60130a6d7a05abebb142f08f671319 17 | RETableViewManager: b6c8e1d0cb394fb923e9192b174ad30e815c215e 18 | REValidation: a0033a582415848854e875dfcbe69c107de19f81 19 | 20 | COCOAPODS: 0.35.0 21 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - REFormattedNumberField (1.1.5) 3 | - RETableViewManager (1.5.14): 4 | - REFormattedNumberField (~> 1.1.5) 5 | - REValidation (~> 0.1.4) 6 | - REValidation (0.1.4) 7 | 8 | DEPENDENCIES: 9 | - RETableViewManager (from `../`) 10 | 11 | EXTERNAL SOURCES: 12 | RETableViewManager: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | REFormattedNumberField: 86318c549b60130a6d7a05abebb142f08f671319 17 | RETableViewManager: b6c8e1d0cb394fb923e9192b174ad30e815c215e 18 | REValidation: a0033a582415848854e875dfcbe69c107de19f81 19 | 20 | COCOAPODS: 0.35.0 21 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REInlinePickerItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REInlinePickerItem.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/5/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "REInlinePickerItem.h" 10 | 11 | @implementation REInlinePickerItem 12 | 13 | + (instancetype)itemWithPickerItem:(REPickerItem *)pickerItem 14 | { 15 | return [[self alloc] initWithPickerItem:pickerItem]; 16 | } 17 | 18 | - (id)initWithPickerItem:(REPickerItem *)pickerItem 19 | { 20 | self = [super init]; 21 | if (self) { 22 | _pickerItem = pickerItem; 23 | } 24 | return self; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/REFormattedNumberField" "${PODS_ROOT}/Headers/Public/RETableViewManager" "${PODS_ROOT}/Headers/Public/REValidation" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/REFormattedNumberField" -isystem "${PODS_ROOT}/Headers/Public/RETableViewManager" -isystem "${PODS_ROOT}/Headers/Public/REValidation" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-REFormattedNumberField" -l"Pods-RETableViewManager" -l"Pods-REValidation" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /RETableViewManager/Items/REInlineDatePickerItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REInlineDatePickerItem.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 10/4/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "REInlineDatePickerItem.h" 10 | 11 | @implementation REInlineDatePickerItem 12 | 13 | + (instancetype)itemWithDateTimeItem:(REDateTimeItem *)dateTimeItem 14 | { 15 | return [[self alloc] initWithDateTimeItem:dateTimeItem]; 16 | } 17 | 18 | - (id)initWithDateTimeItem:(REDateTimeItem *)dateTimeItem 19 | { 20 | self = [super init]; 21 | if (!self) 22 | return nil; 23 | 24 | _dateTimeItem = dateTimeItem; 25 | 26 | return self; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/REFormattedNumberField" "${PODS_ROOT}/Headers/Public/RETableViewManager" "${PODS_ROOT}/Headers/Public/REValidation" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/REFormattedNumberField" -isystem "${PODS_ROOT}/Headers/Public/RETableViewManager" -isystem "${PODS_ROOT}/Headers/Public/REValidation" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-REFormattedNumberField" -l"Pods-RETableViewManager" -l"Pods-REValidation" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /RETableViewManager/NSBundle+RETableViewManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewManagerBundle.m 3 | // Pods 4 | // 5 | // Created by Kel Bucey on 3/3/16. 6 | // 7 | // 8 | 9 | #import "NSBundle+RETableViewManager.h" 10 | #import "RETableViewManager.h" 11 | 12 | @implementation NSBundle (RETableViewManager) 13 | 14 | + (instancetype)RETableViewManagerBundle { 15 | static NSBundle *bundle = nil; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | NSBundle *containingBundle = [NSBundle bundleForClass:[RETableViewManager class]]; 19 | NSURL *bundleURL = [containingBundle URLForResource:@"RETableViewManager" withExtension:@"bundle"]; 20 | if (bundleURL) { 21 | bundle = [NSBundle bundleWithURL:bundleURL]; 22 | } 23 | }); 24 | 25 | return bundle; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 2/28/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RootViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 17 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:[[RootViewController alloc] initWithStyle:UITableViewStyleGrouped]]; 18 | self.window.rootViewController = navigationController; 19 | self.window.backgroundColor = [UIColor whiteColor]; 20 | [self.window makeKeyAndVisible]; 21 | return YES; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/ControlsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ControlsViewController.h 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 2/28/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "RETableViewOptionsController.h" 12 | 13 | @interface ControlsViewController : UITableViewController 14 | 15 | @property (strong, readonly, nonatomic) RETableViewManager *manager; 16 | @property (strong, readonly, nonatomic) RETableViewSection *basicControlsSection; 17 | @property (strong, readonly, nonatomic) RETableViewSection *creditCardSection; 18 | @property (strong, readonly, nonatomic) RETableViewSection *accessoriesSection; 19 | @property (strong, readonly, nonatomic) RETableViewSection *cutCopyPasteSection; 20 | @property (strong, readonly, nonatomic) RETableViewSection *buttonSection; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // REFormattedNumberField 10 | #define COCOAPODS_POD_AVAILABLE_REFormattedNumberField 11 | #define COCOAPODS_VERSION_MAJOR_REFormattedNumberField 1 12 | #define COCOAPODS_VERSION_MINOR_REFormattedNumberField 1 13 | #define COCOAPODS_VERSION_PATCH_REFormattedNumberField 5 14 | 15 | // RETableViewManager 16 | #define COCOAPODS_POD_AVAILABLE_RETableViewManager 17 | #define COCOAPODS_VERSION_MAJOR_RETableViewManager 1 18 | #define COCOAPODS_VERSION_MINOR_RETableViewManager 5 19 | #define COCOAPODS_VERSION_PATCH_RETableViewManager 14 20 | 21 | // REValidation 22 | #define COCOAPODS_POD_AVAILABLE_REValidation 23 | #define COCOAPODS_VERSION_MAJOR_REValidation 0 24 | #define COCOAPODS_VERSION_MINOR_REValidation 1 25 | #define COCOAPODS_VERSION_PATCH_REValidation 4 26 | 27 | -------------------------------------------------------------------------------- /RETableViewManager.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'RETableViewManager' 3 | s.version = '1.7' 4 | s.authors = { 'Roman Efimov' => 'romefimov@gmail.com' } 5 | s.homepage = 'https://github.com/romaonthego/RETableViewManager' 6 | s.summary = 'Powerful data driven content manager for UITableView.' 7 | s.source = { :git => 'https://github.com/romaonthego/RETableViewManager.git', 8 | :tag => s.version.to_s } 9 | s.license = { :type => "MIT", :file => "LICENSE" } 10 | 11 | s.platform = :ios, '7.0' 12 | s.requires_arc = true 13 | s.source_files = 'RETableViewManager/Cells', 'RETableViewManager/Items', 'RETableViewManager' 14 | s.public_header_files = 'RETableViewManager/Cells/*.h', 'RETableViewManager/*.h', 'RETableViewManager/Items/*.h' 15 | s.resource_bundle = { 'RETableViewManager' => 'RETableViewManager/Resources/*' } 16 | s.preserve_paths = 'RETableViewManager/Resources' 17 | 18 | s.ios.deployment_target = '7.0' 19 | 20 | s.dependency 'REFormattedNumberField', '~> 1.1.5' 21 | s.dependency 'REValidation', '~> 0.1.4' 22 | end 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Local Podspecs/RETableViewManager.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'RETableViewManager' 3 | s.version = '1.5.14' 4 | s.authors = { 'Roman Efimov' => 'romefimov@gmail.com' } 5 | s.homepage = 'https://github.com/romaonthego/RETableViewManager' 6 | s.summary = 'Powerful data driven content manager for UITableView.' 7 | s.source = { :git => 'https://github.com/romaonthego/RETableViewManager.git', 8 | :tag => s.version.to_s } 9 | s.license = { :type => "MIT", :file => "LICENSE" } 10 | 11 | s.platform = :ios, '7.0' 12 | s.requires_arc = true 13 | s.source_files = 'RETableViewManager/Cells', 'RETableViewManager/Items', 'RETableViewManager' 14 | s.public_header_files = 'RETableViewManager/Cells/*.h', 'RETableViewManager/*.h', 'RETableViewManager/Items/*.h' 15 | s.resource_bundle = { 'RETableViewManager' => 'RETableViewManager/Resources/*' } 16 | s.preserve_paths = 'RETableViewManager/Resources' 17 | 18 | s.ios.deployment_target = '7.0' 19 | 20 | s.dependency 'REFormattedNumberField', '~> 1.1.5' 21 | s.dependency 'REValidation', '~> 0.1.4' 22 | end 23 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListImageCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ListImageCell.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "ListImageCell.h" 10 | 11 | @interface ListImageCell () 12 | 13 | @property (strong, readwrite, nonatomic) UIImageView *pictureView; 14 | 15 | @end 16 | 17 | @implementation ListImageCell 18 | 19 | + (CGFloat)heightWithItem:(NSObject *)item tableViewManager:(RETableViewManager *)tableViewManager 20 | { 21 | return 306; 22 | } 23 | 24 | - (void)cellDidLoad 25 | { 26 | [super cellDidLoad]; 27 | self.pictureView = [[UIImageView alloc] initWithFrame:CGRectMake(7, 0, 306, 306)]; 28 | self.pictureView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 29 | [self addSubview:self.pictureView]; 30 | } 31 | 32 | - (void)cellWillAppear 33 | { 34 | [super cellWillAppear]; 35 | [self.pictureView setImage:[UIImage imageNamed:self.imageItem.imageName]]; 36 | } 37 | 38 | - (void)cellDidDisappear 39 | { 40 | 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REFormattedNumberField/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REURLValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // REURLValidator.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REValidator.h" 27 | 28 | @interface REURLValidator : REValidator 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REEmailValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // REEmailValidator.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REValidator.h" 27 | 28 | @interface REEmailValidator : REValidator 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/RELengthValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // RELengthValidator.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REValidator.h" 27 | 28 | @interface RELengthValidator : REValidator 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REPresenceValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // REPresenceValidator.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REValidator.h" 27 | 28 | @interface REPresenceValidator : REValidator 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/NSError+REValidation.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+REValidation.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @interface NSError (REValidation) 29 | 30 | + (NSError *)re_validationErrorForDomain:(NSString *)domain, ...; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewBoolCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewBoolCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "REBoolItem.h" 28 | 29 | @interface RETableViewBoolCell : RETableViewCell 30 | 31 | @property (strong, readonly, nonatomic) UISwitch *switchView; 32 | @property (strong, readwrite, nonatomic) REBoolItem *item; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RETableViewManager/NSString+RETableViewManagerAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RETableViewManagerAdditions.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @interface NSString (RETableViewManagerAdditions) 29 | 30 | - (CGSize)re_sizeWithFont:(UIFont *)font; 31 | - (CGSize)re_sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewFloatCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewFloatCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "REFloatItem.h" 28 | 29 | @interface RETableViewFloatCell : RETableViewCell 30 | 31 | @property (strong, readonly, nonatomic) UISlider *sliderView; 32 | @property (strong, readwrite, nonatomic) REFloatItem *item; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewOptionCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewOptionCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "RERadioItem.h" 28 | 29 | @interface RETableViewOptionCell : RETableViewCell 30 | 31 | @property (strong, readwrite, nonatomic) RERadioItem *item; 32 | @property (strong, readonly, nonatomic) UILabel *valueLabel; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewNumberCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewNumberCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | #import "RETableViewTextCell.h" 26 | #import 27 | #import "RENumberItem.h" 28 | 29 | @interface RETableViewNumberCell : RETableViewTextCell 30 | 31 | @property (strong, readwrite, nonatomic) RENumberItem *item; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/IndexedListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // IndexedListViewController.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/14/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "IndexedListViewController.h" 10 | 11 | @interface IndexedListViewController () 12 | 13 | @property (strong, readwrite, nonatomic) RETableViewManager *manager; 14 | 15 | @end 16 | 17 | @implementation IndexedListViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | self.title = @"Indexed List"; 23 | 24 | // Create manager 25 | // 26 | self.manager = [[RETableViewManager alloc] initWithTableView:self.tableView]; 27 | 28 | NSArray *sectionTitles = @[@"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", @"J", @"K", @"L", @"M", 29 | @"N", @"O", @"P", @"Q", @"R", @"S", @"T", @"U", @"V", @"W", @"X", @"Y", @"Z"]; 30 | 31 | // Add sections and items 32 | // 33 | for (NSString *sectionTitle in sectionTitles) { 34 | RETableViewSection *section = [RETableViewSection sectionWithHeaderTitle:sectionTitle]; 35 | section.indexTitle = sectionTitle; // assign index title 36 | 37 | // Add 5 items with name `section title + item index` 38 | // 39 | for (NSInteger i = 1; i <= 5; i++) 40 | [section addItem:[NSString stringWithFormat:@"%@%li", sectionTitle, (long) i]]; 41 | 42 | [self.manager addSection:section]; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewTextCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewTextCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "RETextItem.h" 28 | 29 | @interface RETableViewTextCell : RETableViewCell 30 | 31 | @property (strong, readwrite, nonatomic) RETextItem *item; 32 | @property (strong, readwrite, nonatomic) UITextField *textField; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewLongTextCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RELongTextCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "RELongTextItem.h" 28 | #import "REPlaceholderTextView.h" 29 | 30 | @interface RETableViewLongTextCell : RETableViewCell 31 | 32 | @property (strong, readwrite, nonatomic) RELongTextItem *item; 33 | @property (strong, readonly, nonatomic) REPlaceholderTextView *textView; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RETableViewManager/REPlaceholderTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // REPlaceholderTextView.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @interface REPlaceholderTextView : UITextView 29 | 30 | @property (strong, readonly, nonatomic) UILabel *placeholderLabel; 31 | @property (copy, readwrite, nonatomic) NSString *placeholder; 32 | @property (strong, readwrite, nonatomic) UIColor *placeholderColor; 33 | 34 | - (void)textChanged:(NSNotification *)notification; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewSegmentedCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewSegmentedCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Dmitry Shmidt (https://github.com/shmidt) 6 | // Roman Efimov (https://github.com/romaonthego) 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 | // 26 | 27 | #import "RETableViewCell.h" 28 | #import "RESegmentedItem.h" 29 | 30 | @interface RETableViewSegmentedCell : RETableViewCell 31 | 32 | @property (strong, readonly, nonatomic) UISegmentedControl *segmentedControl; 33 | @property (strong, readwrite, nonatomic) RESegmentedItem *item; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RELongTextItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RELongTextItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETextItem.h" 27 | 28 | @interface RELongTextItem : RETextItem 29 | 30 | @property (strong, readwrite, nonatomic) UIColor *placeholderColor; 31 | @property (assign, readwrite, nonatomic) BOOL editable; 32 | 33 | + (instancetype)itemWithValue:(NSString *)value placeholder:(NSString *)placeholder; 34 | - (id)initWithValue:(NSString *)value placeholder:(NSString *)placeholder; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RENumberItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RENumberItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETextItem.h" 27 | 28 | @interface RENumberItem : RETextItem 29 | 30 | @property (copy, readwrite, nonatomic) NSString *format; 31 | 32 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder format:(NSString *)format; 33 | - (id)initWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder format:(NSString *)format; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RERadioItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RERadioItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | 28 | @interface RERadioItem : RETableViewItem 29 | 30 | @property (copy, readwrite, nonatomic) NSString *value; 31 | 32 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value selectionHandler:(void(^)(RERadioItem *item))selectionHandler; 33 | - (id)initWithTitle:(NSString *)title value:(NSString *)value selectionHandler:(void(^)(RERadioItem *item))selectionHandler; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REMultipleChoiceItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REMultipleChoiceItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | 28 | @interface REMultipleChoiceItem : RETableViewItem 29 | 30 | @property (strong, readwrite, nonatomic) NSArray *value; 31 | 32 | + (instancetype)itemWithTitle:(NSString *)title value:(NSArray *)value selectionHandler:(void(^)(REMultipleChoiceItem *item))selectionHandler; 33 | - (id)initWithTitle:(NSString *)title value:(NSArray *)value selectionHandler:(void(^)(REMultipleChoiceItem *item))selectionHandler; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/NSError+REValidation.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+REValidation.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "NSError+REValidation.h" 27 | #import "REValidation.h" 28 | 29 | @implementation NSError (REValidation) 30 | 31 | + (NSError *)re_validationErrorForDomain:(NSString *)domain, ... 32 | { 33 | va_list args; 34 | va_start(args, domain); 35 | NSError *error = [NSError errorWithDomain:domain code:0 userInfo:@{ NSLocalizedDescriptionKey:[[NSString alloc] initWithFormat:[REValidation errorMessageForDomain:domain] arguments:args] }]; 36 | va_end(args); 37 | return error; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewPickerCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewPickerCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewCell.h" 27 | #import "REPickerItem.h" 28 | 29 | @interface RETableViewPickerCell : RETableViewCell 30 | 31 | @property (strong, readonly, nonatomic) UITextField *textField; 32 | @property (strong, readonly, nonatomic) UILabel *valueLabel; 33 | @property (strong, readonly, nonatomic) UILabel *placeholderLabel; 34 | @property (strong, readonly, nonatomic) UIPickerView *pickerView; 35 | @property (strong, readwrite, nonatomic) REPickerItem *item; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewDateTimeCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewDateTimeCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewTextCell.h" 27 | #import "REDateTimeItem.h" 28 | #import "REInlineDatePickerItem.h" 29 | 30 | @interface RETableViewDateTimeCell : RETableViewCell 31 | 32 | @property (strong, readonly, nonatomic) UITextField *textField; 33 | @property (strong, readonly, nonatomic) UILabel *dateLabel; 34 | @property (strong, readonly, nonatomic) UILabel *placeholderLabel; 35 | @property (strong, readonly, nonatomic) UIDatePicker *datePicker; 36 | @property (strong, readwrite, nonatomic) REDateTimeItem *item; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REFormattedNumberField/REFormattedNumberField/REFormattedNumberField.h: -------------------------------------------------------------------------------- 1 | // 2 | // REFormattedNumberField.h 3 | // REFormattedNumberField 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "NSString+RENumberFormat.h" 28 | 29 | @interface REFormattedNumberField : UITextField 30 | 31 | @property (copy, readwrite, nonatomic) NSString *format; 32 | @property (copy, readonly, nonatomic) NSString *unformattedText; 33 | 34 | // Use NSString category NSString+RENumberFormat 35 | // - (NSString *)re_stringWithNumberFormat:(NSString *)format; 36 | // 37 | - (NSString *)string:(NSString *)string withNumberFormat:(NSString *)format __attribute__ ((deprecated)); 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /RETableViewManager/REActionBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // REActionBar.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @protocol REActionBarDelegate; 29 | 30 | @interface REActionBar : UIToolbar 31 | 32 | @property (strong, readonly, nonatomic) UISegmentedControl *navigationControl; 33 | @property (weak, readwrite, nonatomic) id actionBarDelegate; 34 | 35 | - (id)initWithDelegate:(id)delegate; 36 | 37 | @end 38 | 39 | @protocol REActionBarDelegate 40 | 41 | - (void)actionBar:(REActionBar *)actionBar navigationControlValueChanged:(UISegmentedControl *)navigationControl; 42 | - (void)actionBar:(REActionBar *)actionBar doneButtonPressed:(UIBarButtonItem *)doneButtonItem; 43 | 44 | @end -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ListHeaderView.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 4/2/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "ListHeaderView.h" 10 | 11 | @interface ListHeaderView () 12 | 13 | @property (strong, readwrite, nonatomic) UIImageView *userpicImageView; 14 | @property (strong, readwrite, nonatomic) UILabel *usernameLabel; 15 | 16 | @end 17 | 18 | @implementation ListHeaderView 19 | 20 | + (ListHeaderView *)headerViewWithImageNamed:(NSString *)imageNamed username:(NSString *)username 21 | { 22 | ListHeaderView *view = [[ListHeaderView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; 23 | [view.userpicImageView setImage:[UIImage imageNamed:imageNamed]]; 24 | [view.usernameLabel setText:username]; 25 | return view; 26 | } 27 | 28 | - (id)initWithFrame:(CGRect)frame 29 | { 30 | self = [super initWithFrame:frame]; 31 | if (self) { 32 | self.autoresizingMask = UIViewAutoresizingFlexibleWidth; 33 | UIView *backgroundView = [[UIView alloc] initWithFrame:self.bounds]; 34 | backgroundView.backgroundColor = [UIColor whiteColor]; 35 | backgroundView.alpha = 0.9; 36 | backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth; 37 | [self addSubview:backgroundView]; 38 | 39 | self.userpicImageView = [[UIImageView alloc] initWithFrame:CGRectMake(7, 7, 30, 30)]; 40 | [self addSubview:self.userpicImageView]; 41 | 42 | self.usernameLabel = [[UILabel alloc] initWithFrame:CGRectMake(45, 3, 276, 35)]; 43 | self.usernameLabel.font = [UIFont boldSystemFontOfSize:14]; 44 | self.usernameLabel.textColor = [UIColor blackColor]; 45 | self.usernameLabel.backgroundColor = [UIColor clearColor]; 46 | [self addSubview:self.usernameLabel]; 47 | } 48 | return self; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REBoolItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REBoolItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | 28 | @interface REBoolItem : RETableViewItem 29 | 30 | @property (assign, readwrite, nonatomic) BOOL value; 31 | @property (copy, readwrite, nonatomic) void (^switchValueChangeHandler)(REBoolItem *item); 32 | 33 | + (instancetype)itemWithTitle:(NSString *)title value:(BOOL)value switchValueChangeHandler:(void(^)(REBoolItem *item))switchValueChangeHandler; 34 | + (instancetype)itemWithTitle:(NSString *)title value:(BOOL)value; 35 | 36 | - (id)initWithTitle:(NSString *)title value:(BOOL)value switchValueChangeHandler:(void(^)(REBoolItem *item))switchValueChangeHandler; 37 | - (id)initWithTitle:(NSString *)title value:(BOOL)value; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/XIBTestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XIBTestViewController.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 8/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "XIBTestViewController.h" 10 | #import "XIBTestItem.h" 11 | 12 | @interface XIBTestViewController () 13 | 14 | @property (strong, readwrite, nonatomic) RETableViewManager *manager; 15 | 16 | @end 17 | 18 | @implementation XIBTestViewController 19 | 20 | - (void)viewDidLoad 21 | { 22 | [super viewDidLoad]; 23 | self.title = @"XIB Support"; 24 | 25 | // Create manager 26 | // 27 | self.manager = [[RETableViewManager alloc] initWithTableView:self.tableView delegate:self]; 28 | 29 | // Map item to a cell, this will also register the XIBTestCell.xib for the XIBTestItem identifier 30 | // 31 | self.manager[@"XIBTestItem"] = @"XIBTestCell"; 32 | 33 | // Add a section 34 | // 35 | RETableViewSection *section = [RETableViewSection section]; 36 | [self.manager addSection:section]; 37 | 38 | for (NSInteger i = 1; i < 100; i++) { 39 | NSString *title = [NSString stringWithFormat:@"Item %li", (long) i]; 40 | XIBTestItem *item = [XIBTestItem itemWithTitle:title 41 | accessoryType:UITableViewCellAccessoryNone 42 | selectionHandler:^(RETableViewItem *item) { 43 | [item deselectRowAnimated:YES]; 44 | }]; 45 | [section addItem:item]; 46 | } 47 | 48 | // Cell is being assigned an automatic identifier 49 | // 50 | // You can manually set it if you want to: 51 | // item.cellIdentifier = @"CustomIdentifier"; 52 | // 53 | // You'll need to register a cell class for it as well: 54 | // [self.tableView registerNib:[UINib nibWithNibName:@"XIBTestCell" bundle:nil] forCellReuseIdentifier:@"CustomIdentifier"]; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REPresenceValidator.m: -------------------------------------------------------------------------------- 1 | // 2 | // REPresenceValidator.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REPresenceValidator.h" 27 | #import "NSError+REValidation.h" 28 | 29 | @implementation REPresenceValidator 30 | 31 | + (NSString *)name 32 | { 33 | return @"presence"; 34 | } 35 | 36 | + (NSError *)validateObject:(NSString *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters 37 | { 38 | if (!object) 39 | return [NSError re_validationErrorForDomain:@"com.REValidation.presence", name]; 40 | 41 | if ([object isKindOfClass:[NSString class]] && object.length == 0) 42 | return [NSError re_validationErrorForDomain:@"com.REValidation.presence", name]; 43 | 44 | return nil; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RENumberItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RENumberItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RENumberItem.h" 27 | 28 | @implementation RENumberItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder format:(NSString *)format 31 | { 32 | return [[self alloc] initWithTitle:title value:value placeholder:placeholder format:format]; 33 | } 34 | 35 | - (id)initWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder format:(NSString *)format 36 | { 37 | self = [super init]; 38 | if (!self) 39 | return nil; 40 | 41 | self.title = title; 42 | self.value = value; 43 | self.placeholder = placeholder; 44 | self.format = format; 45 | 46 | return self; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REFloatItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REFloatItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | 28 | @interface REFloatItem : RETableViewItem 29 | 30 | @property (assign, readwrite, nonatomic) float value; 31 | @property (assign, readwrite, nonatomic) CGFloat sliderWidth; 32 | @property (copy, readwrite, nonatomic) void (^sliderValueChangeHandler)(REFloatItem *item); 33 | 34 | + (instancetype)itemWithTitle:(NSString *)title value:(float)value sliderValueChangeHandler:(void(^)(REFloatItem *item))sliderValueChangeHandler; 35 | + (instancetype)itemWithTitle:(NSString *)title value:(float)value; 36 | 37 | - (id)initWithTitle:(NSString *)title value:(float)value sliderValueChangeHandler:(void(^)(REFloatItem *item))sliderValueChangeHandler; 38 | - (id)initWithTitle:(NSString *)title value:(float)value; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/RetractableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RetractableViewController.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 6/4/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "RetractableViewController.h" 10 | 11 | @interface RetractableViewController () 12 | 13 | @property (strong, readwrite, nonatomic) RETableViewManager *manager; 14 | 15 | @end 16 | 17 | @implementation RetractableViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | self.title = @"Retractable"; 23 | 24 | // Create manager 25 | // 26 | self.manager = [[RETableViewManager alloc] initWithTableView:self.tableView]; 27 | 28 | // Add main section 29 | // 30 | RETableViewSection *section = [RETableViewSection section]; 31 | [self.manager addSection:section]; 32 | 33 | NSMutableArray *collapsedItems = [NSMutableArray array]; 34 | NSMutableArray *expandedItems = [NSMutableArray array]; 35 | 36 | RETableViewItem *showMoreItem = [RETableViewItem itemWithTitle:@"Show More" accessoryType:UITableViewCellAccessoryDisclosureIndicator selectionHandler:^(RETableViewItem *item) { 37 | [section replaceItemsWithItemsFromArray:expandedItems]; 38 | [section reloadSectionWithAnimation:UITableViewRowAnimationAutomatic]; 39 | }]; 40 | 41 | RETableViewItem *showLessItem = [RETableViewItem itemWithTitle:@"Show Less" accessoryType:UITableViewCellAccessoryDisclosureIndicator selectionHandler:^(RETableViewItem *item) { 42 | [section replaceItemsWithItemsFromArray:collapsedItems]; 43 | [section reloadSectionWithAnimation:UITableViewRowAnimationAutomatic]; 44 | }]; 45 | 46 | [collapsedItems addObjectsFromArray:@[@"Test item 1", @"Test item 2", @"Test item 3", showMoreItem]]; 47 | [expandedItems addObjectsFromArray:@[@"Test item 1", @"Test item 2", @"Test item 3", @"Test item 4", @"Test item 5", @"Test item 6", showLessItem]]; 48 | 49 | [section addItemsFromArray:collapsedItems]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REPickerItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REPickerItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | #import "REInlinePickerItem.h" 28 | 29 | @interface REPickerItem : RETableViewItem 30 | 31 | @property (strong, readwrite, nonatomic) NSArray *options; 32 | @property (strong, readwrite, nonatomic) NSArray *value; 33 | @property (copy, readwrite, nonatomic) NSString *placeholder; 34 | @property (assign, readwrite, nonatomic) BOOL inlinePicker; 35 | @property (strong, readwrite, nonatomic) REInlinePickerItem *inlinePickerItem; 36 | @property (copy, readwrite, nonatomic) void (^onChange)(REPickerItem *item); 37 | 38 | + (instancetype)itemWithTitle:(NSString *)title value:(NSArray *)value placeholder:(NSString *)placeholder options:(NSArray *)options; 39 | - (id)initWithTitle:(NSString *)title value:(NSArray *)value placeholder:(NSString *)placeholder options:(NSArray *)options; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REEmailValidator.m: -------------------------------------------------------------------------------- 1 | // 2 | // REEmailValidator.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REEmailValidator.h" 27 | #import "REValidation.h" 28 | 29 | @implementation REEmailValidator 30 | 31 | + (NSString *)name 32 | { 33 | return @"email"; 34 | } 35 | 36 | + (NSError *)validateObject:(NSString *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters 37 | { 38 | NSString *string = object ? object : @""; 39 | if (string.length == 0) 40 | return nil; 41 | 42 | NSError *error = NULL; 43 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}" options:NSRegularExpressionCaseInsensitive error:&error]; 44 | NSTextCheckingResult *match = [regex firstMatchInString:string options:0 range:NSMakeRange(0, string.length)]; 45 | 46 | if (!match) 47 | return [NSError re_validationErrorForDomain:@"com.REValidation.email", name]; 48 | 49 | return nil; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /RETableViewManager/RETableViewOptionsController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewOptionsController.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "RETableViewManager.h" 28 | 29 | @interface RETableViewOptionsController : UITableViewController 30 | 31 | @property (weak, readwrite, nonatomic) RETableViewItem *item; 32 | @property (strong, readwrite, nonatomic) NSArray *options; 33 | @property (strong, readonly, nonatomic) RETableViewManager *tableViewManager; 34 | @property (strong, readonly, nonatomic) RETableViewSection *mainSection; 35 | @property (assign, readwrite, nonatomic) BOOL multipleChoice; 36 | @property (copy, readwrite, nonatomic) void (^completionHandler)(RETableViewItem *item); 37 | @property (strong, readwrite, nonatomic) RETableViewCellStyle *style; 38 | @property (weak, readwrite, nonatomic) id delegate; 39 | 40 | - (id)initWithItem:(RETableViewItem *)item options:(NSArray *)options multipleChoice:(BOOL)multipleChoice completionHandler:(void(^)(RETableViewItem *item))completionHandler; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REPickerItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REPickerItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REPickerItem.h" 27 | 28 | @implementation REPickerItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(NSArray *)value placeholder:(NSString *)placeholder options:(NSArray *)options 31 | { 32 | return [[self alloc] initWithTitle:title value:value placeholder:placeholder options:options]; 33 | } 34 | 35 | - (id)initWithTitle:(NSString *)title value:(NSArray *)value placeholder:(NSString *)placeholder options:(NSArray *)options 36 | { 37 | self = [super init]; 38 | if (!self) 39 | return nil; 40 | 41 | self.title = title; 42 | self.value = value; 43 | self.style = UITableViewCellStyleValue1; 44 | self.placeholder = placeholder; 45 | self.value = value; 46 | self.options = options; 47 | 48 | return self; 49 | } 50 | 51 | #pragma mark - 52 | #pragma mark Error validation 53 | 54 | - (NSArray *)errors 55 | { 56 | return [REValidation validateObject:self.value name:self.name ? self.name : self.title validators:self.validators]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RELongTextItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RELongTextItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RELongTextItem.h" 27 | 28 | @implementation RELongTextItem 29 | 30 | + (instancetype)itemWithValue:(NSString *)value placeholder:(NSString *)placeholder 31 | { 32 | return [[self alloc] initWithValue:value placeholder:placeholder]; 33 | } 34 | 35 | - (id)init 36 | { 37 | self = [super init]; 38 | if (!self) 39 | return nil; 40 | 41 | self.placeholderColor = [UIColor lightGrayColor]; 42 | self.editable = YES; 43 | 44 | return self; 45 | } 46 | 47 | - (id)initWithValue:(NSString *)value placeholder:(NSString *)placeholder 48 | { 49 | return [self initWithTitle:nil value:value placeholder:placeholder]; 50 | } 51 | 52 | - (id)initWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder 53 | { 54 | self = [super initWithTitle:title value:value placeholder:placeholder]; 55 | if (!self) 56 | return nil; 57 | 58 | self.placeholderColor = [UIColor lightGrayColor]; 59 | self.editable = YES; 60 | 61 | return self; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Views/MultilineTextCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MultilineTextCell.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 9/11/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "MultilineTextCell.h" 10 | 11 | static const CGFloat kHorizontalMargin = 10.0; 12 | static const CGFloat kVerticalMargin = 10.0; 13 | 14 | @interface MultilineTextCell () 15 | 16 | @property (strong, readwrite, nonatomic) UILabel *multilineLabel; 17 | 18 | @end 19 | 20 | @implementation MultilineTextCell 21 | 22 | + (CGFloat)heightWithItem:(MultilineTextItem *)item tableViewManager:(RETableViewManager *)tableViewManager 23 | { 24 | CGFloat horizontalMargin = kHorizontalMargin; 25 | if (item.section.style.contentViewMargin <= 0) 26 | horizontalMargin += 5.0; 27 | 28 | CGFloat width = CGRectGetWidth(tableViewManager.tableView.bounds) - 2.0 * horizontalMargin; 29 | return [item.title re_sizeWithFont:[UIFont systemFontOfSize:17] constrainedToSize:CGSizeMake(width, INFINITY)].height + 2.0 * kVerticalMargin; 30 | } 31 | 32 | - (void)cellDidLoad 33 | { 34 | [super cellDidLoad]; 35 | self.multilineLabel = [[UILabel alloc] init]; 36 | self.multilineLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 37 | self.multilineLabel.font = [UIFont systemFontOfSize:17]; 38 | self.multilineLabel.numberOfLines = 0; 39 | self.multilineLabel.backgroundColor = [UIColor clearColor]; 40 | [self.contentView addSubview:self.multilineLabel]; 41 | } 42 | 43 | - (void)cellWillAppear 44 | { 45 | [super cellWillAppear]; 46 | self.selectionStyle = UITableViewCellSelectionStyleNone; 47 | self.textLabel.text = @""; 48 | self.multilineLabel.text = self.textItem.title; 49 | } 50 | 51 | - (void)layoutSubviews 52 | { 53 | [super layoutSubviews]; 54 | 55 | CGFloat horizontalMargin = kHorizontalMargin; 56 | if (self.section.style.contentViewMargin <= 0) 57 | horizontalMargin += 5.0; 58 | 59 | CGRect frame = CGRectMake(0, 0, CGRectGetWidth(self.contentView.bounds), [MultilineTextCell heightWithItem:self.textItem tableViewManager:self.tableViewManager]); 60 | frame = CGRectInset(frame, horizontalMargin, kVerticalMargin); 61 | 62 | self.multilineLabel.frame = frame; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /RETableViewManager/RETableViewCellStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewCellStyle.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "RETableViewCell.h" 28 | 29 | @interface RETableViewCellStyle : NSObject 30 | 31 | @property (assign, readwrite, nonatomic) CGFloat cellHeight; 32 | @property (assign, readwrite, nonatomic) UITableViewCellSelectionStyle defaultCellSelectionStyle; 33 | @property (assign, readwrite, nonatomic) CGFloat backgroundImageMargin; 34 | @property (assign, readwrite, nonatomic) CGFloat contentViewMargin; 35 | @property (strong, readwrite, nonatomic) NSMutableDictionary *backgroundImages; 36 | @property (strong, readwrite, nonatomic) NSMutableDictionary *selectedBackgroundImages; 37 | 38 | - (BOOL)hasCustomBackgroundImage; 39 | - (UIImage *)backgroundImageForCellType:(RETableViewCellType)cellType; 40 | - (void)setBackgroundImage:(UIImage *)image forCellType:(RETableViewCellType)cellType; 41 | 42 | - (BOOL)hasCustomSelectedBackgroundImage; 43 | - (UIImage *)selectedBackgroundImageForCellType:(RETableViewCellType)cellType; 44 | - (void)setSelectedBackgroundImage:(UIImage *)image forCellType:(RETableViewCellType)cellType; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/RETableViewManagerExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UILaunchImages 6 | 7 | 8 | UILaunchImageSize 9 | {320, 568} 10 | UILaunchImageName 11 | Default-568h 12 | UILaunchImageOrientation 13 | Portrait 14 | UILaunchImageMinimumOSVersion 15 | 8.0 16 | 17 | 18 | UILaunchImageSize 19 | {414, 736} 20 | UILaunchImageName 21 | Default-736h 22 | UILaunchImageOrientation 23 | Portrait 24 | UILaunchImageMinimumOSVersion 25 | 8.0 26 | 27 | 28 | UILaunchImageSize 29 | {375, 667} 30 | UILaunchImageName 31 | Default-667h 32 | UILaunchImageOrientation 33 | Portrait 34 | UILaunchImageMinimumOSVersion 35 | 8.0 36 | 37 | 38 | CFBundleDevelopmentRegion 39 | en 40 | CFBundleDisplayName 41 | ${PRODUCT_NAME} 42 | CFBundleExecutable 43 | ${EXECUTABLE_NAME} 44 | CFBundleIdentifier 45 | Roman-Efimov.${PRODUCT_NAME:rfc1034identifier} 46 | CFBundleInfoDictionaryVersion 47 | 6.0 48 | CFBundleName 49 | ${PRODUCT_NAME} 50 | CFBundlePackageType 51 | APPL 52 | CFBundleShortVersionString 53 | 1.0 54 | CFBundleSignature 55 | ???? 56 | CFBundleVersion 57 | 1.0 58 | LSRequiresIPhoneOS 59 | 60 | UIRequiredDeviceCapabilities 61 | 62 | armv7 63 | 64 | UISupportedInterfaceOrientations 65 | 66 | UIInterfaceOrientationPortrait 67 | UIInterfaceOrientationLandscapeLeft 68 | UIInterfaceOrientationLandscapeRight 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /RETableViewManager/Cells/RETableViewCreditCardCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RETableViewCreditCardCell.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "RETableViewCell.h" 28 | #import "RECreditCardItem.h" 29 | 30 | @interface RETableViewCreditCardCell : RETableViewCell 31 | 32 | @property (strong, readwrite, nonatomic) RECreditCardItem *item; 33 | @property (assign, readwrite, nonatomic) CGSize textFieldPositionOffset; 34 | 35 | @property (strong, readonly, nonatomic) UIView *wrapperView; 36 | @property (strong, readonly, nonatomic) UIView *creditCardImageViewContainer; 37 | @property (strong, readonly, nonatomic) UIImageView *currentImageView; 38 | @property (strong, readonly, nonatomic) UIImageView *creditCardBackImageView; 39 | @property (strong, readonly, nonatomic) UIImageView *creditCardImageView; 40 | @property (strong, readonly, nonatomic) UIImageView *creditCardStackImageView; 41 | @property (strong, readonly, nonatomic) REFormattedNumberField *creditCardField; 42 | @property (strong, readonly, nonatomic) REFormattedNumberField *expirationDateField; 43 | @property (strong, readonly, nonatomic) REFormattedNumberField *cvvField; 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RETextItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RETextItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETextItem.h" 27 | 28 | @implementation RETextItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value 31 | { 32 | return [[self alloc] initWithTitle:title value:value]; 33 | } 34 | 35 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder 36 | { 37 | return [[self alloc] initWithTitle:title value:value placeholder:placeholder]; 38 | } 39 | 40 | - (id)initWithTitle:(NSString *)title value:(NSString *)value 41 | { 42 | return [self initWithTitle:title value:value placeholder:nil]; 43 | } 44 | 45 | - (id)initWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder 46 | { 47 | self = [super init]; 48 | if (!self) 49 | return nil; 50 | 51 | self.title = title; 52 | self.value = value; 53 | self.placeholder = placeholder; 54 | 55 | return self; 56 | } 57 | 58 | #pragma mark - 59 | #pragma mark Error validation 60 | 61 | - (NSArray *)errors 62 | { 63 | return [REValidation validateObject:self.value name:self.name ? self.name : self.title validators:self.validators]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REDateTimeItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REDateTimeItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REDateTimeItem.h" 27 | 28 | @implementation REDateTimeItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(NSDate *)value placeholder:(NSString *)placeholder format:(NSString *)format datePickerMode:(UIDatePickerMode)datePickerMode 31 | { 32 | return [[self alloc] initWithTitle:title value:value placeholder:placeholder format:format datePickerMode:datePickerMode]; 33 | } 34 | 35 | - (id)initWithTitle:(NSString *)title value:(NSDate *)value placeholder:(NSString *)placeholder format:(NSString *)format datePickerMode:(UIDatePickerMode)datePickerMode 36 | { 37 | self = [super init]; 38 | if (!self) 39 | return nil; 40 | 41 | self.title = title; 42 | self.value = value; 43 | self.format = format; 44 | self.datePickerMode = datePickerMode; 45 | self.style = UITableViewCellStyleValue1; 46 | self.placeholder = placeholder; 47 | 48 | return self; 49 | } 50 | 51 | #pragma mark - 52 | #pragma mark Error validation 53 | 54 | - (NSArray *)errors 55 | { 56 | return [REValidation validateObject:self.value name:self.name ? self.name : self.title validators:self.validators]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/REValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // REValidator.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @interface REValidator : NSObject 29 | 30 | @property (strong, readonly, nonatomic) NSDictionary *parameters; 31 | @property (copy, readwrite, nonatomic) NSError *(^inlineValidation)(id object, NSString *name); 32 | 33 | ///----------------------------- 34 | /// @name Getting Validator Instance 35 | ///----------------------------- 36 | 37 | + (instancetype)validator; 38 | + (instancetype)validatorWithParameters:(NSDictionary *)parameters; 39 | + (instancetype)validatorWithInlineValidation:(NSError *(^)(id object, NSString *name))validation; 40 | 41 | ///----------------------------- 42 | /// @name Configuring Representation 43 | ///----------------------------- 44 | 45 | + (NSString *)name; 46 | + (NSDictionary *)parseParameterString:(NSString *)string; 47 | 48 | ///----------------------------- 49 | /// @name Validating Objects 50 | ///----------------------------- 51 | 52 | + (NSError *)validateObject:(NSObject *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters; 53 | + (NSError *)validateObject:(NSObject *)object variableName:(NSString *)name validation:(NSError *(^)(id object, NSString *name))validation; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/REURLValidator.m: -------------------------------------------------------------------------------- 1 | // 2 | // REURLValidator.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REURLValidator.h" 27 | #import "REValidation.h" 28 | 29 | @implementation REURLValidator 30 | 31 | + (NSString *)name 32 | { 33 | return @"url"; 34 | } 35 | 36 | + (NSError *)validateObject:(NSString *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters 37 | { 38 | NSString *string = object ? object : @""; 39 | if (string.length == 0) 40 | return nil; 41 | 42 | NSError *error = NULL; 43 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^(?i)(?:(?:https?|ftp):\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$" options:NSRegularExpressionCaseInsensitive error:&error]; 44 | NSTextCheckingResult *match = [regex firstMatchInString:string options:0 range:NSMakeRange(0, string.length)]; 45 | if (!match) 46 | return [NSError re_validationErrorForDomain:@"com.REValidation.url", name]; 47 | 48 | return nil; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REBoolItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REBoolItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REBoolItem.h" 27 | 28 | @implementation REBoolItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(BOOL)value 31 | { 32 | return [[self alloc] initWithTitle:title value:value]; 33 | } 34 | 35 | + (instancetype)itemWithTitle:(NSString *)title value:(BOOL)value switchValueChangeHandler:(void(^)(REBoolItem *item))switchValueChangeHandler 36 | { 37 | return [[self alloc] initWithTitle:title value:value switchValueChangeHandler:switchValueChangeHandler]; 38 | } 39 | 40 | - (id)initWithTitle:(NSString *)title value:(BOOL)value 41 | { 42 | return [self initWithTitle:title value:value switchValueChangeHandler:nil]; 43 | } 44 | 45 | - (id)initWithTitle:(NSString *)title value:(BOOL)value switchValueChangeHandler:(void(^)(REBoolItem *item))switchValueChangeHandler 46 | { 47 | self = [super init]; 48 | if (!self) 49 | return nil; 50 | 51 | self.title = title; 52 | self.value = value; 53 | self.switchValueChangeHandler = switchValueChangeHandler; 54 | 55 | return self; 56 | } 57 | 58 | #pragma mark - 59 | #pragma mark Error validation 60 | 61 | - (NSArray *)errors 62 | { 63 | return [REValidation validateObject:@(self.value) name:self.name ? self.name : self.title validators:self.validators]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Documentation/html/hierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RETableViewManager Hierarchy 6 | 7 | 8 | 9 | 10 | 11 |
12 | 16 | 17 | 20 | 21 |
22 |
23 |
24 | 27 | 32 |
33 | 34 |
35 |

Class Hierarchy

36 | 37 | 50 | 51 |
52 | 53 | 54 | 55 |
56 | 57 |

Protocol References

58 | 63 | 64 | 65 |
66 | 67 |
68 | 71 | 81 |
82 |
83 | 84 | -------------------------------------------------------------------------------- /Documentation/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RETableViewManager Reference 6 | 7 | 8 | 9 | 10 | 11 |
12 | 16 | 17 | 20 | 21 |
22 |
23 |
24 | 27 | 32 |
33 | 34 | 35 | 36 | 37 | 38 |
39 |

Class References

40 | 47 |
48 | 49 | 50 | 51 |
52 | 53 |

Protocol References

54 | 59 | 60 | 61 |
62 | 63 |
64 | 67 | 77 |
78 |
79 | 80 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REFloatItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REFloatItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REFloatItem.h" 27 | 28 | @implementation REFloatItem 29 | 30 | + (instancetype)itemWithTitle:(NSString *)title value:(float)value 31 | { 32 | return [[self alloc] initWithTitle:title value:value]; 33 | } 34 | 35 | + (instancetype)itemWithTitle:(NSString *)title value:(float)value sliderValueChangeHandler:(void(^)(REFloatItem *item))sliderValueChangeHandler 36 | { 37 | return [[self alloc] initWithTitle:title value:value sliderValueChangeHandler:sliderValueChangeHandler]; 38 | } 39 | 40 | - (id)initWithTitle:(NSString *)title value:(float)value 41 | { 42 | return [self initWithTitle:title value:value sliderValueChangeHandler:nil]; 43 | } 44 | 45 | - (id)initWithTitle:(NSString *)title value:(float)value sliderValueChangeHandler:(void(^)(REFloatItem *item))sliderValueChangeHandler 46 | { 47 | self = [super init]; 48 | if (!self) 49 | return nil; 50 | 51 | self.title = title; 52 | self.value = value; 53 | self.sliderValueChangeHandler = sliderValueChangeHandler; 54 | self.sliderWidth = 140.0; 55 | 56 | return self; 57 | } 58 | 59 | #pragma mark - 60 | #pragma mark Error validation 61 | 62 | - (NSArray *)errors 63 | { 64 | return [REValidation validateObject:@(self.value) name:self.name ? self.name : self.title validators:self.validators]; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/REValidation.h: -------------------------------------------------------------------------------- 1 | // 2 | // REValidation.h 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | #import "REValidator.h" 28 | #import "NSError+REValidation.h" 29 | #import "REPresenceValidator.h" 30 | #import "RELengthValidator.h" 31 | #import "REEmailValidator.h" 32 | #import "REURLValidator.h" 33 | 34 | @interface REValidation : NSObject 35 | 36 | ///----------------------------- 37 | /// @name Registering Validators 38 | ///----------------------------- 39 | 40 | + (void)registerDefaultValidators; 41 | + (void)registerDefaultErrorMessages; 42 | + (void)registerValidator:(Class)validatorClass; 43 | 44 | ///----------------------------- 45 | /// @name Validating Objects 46 | ///----------------------------- 47 | 48 | + (NSError *)validateObject:(NSObject *)object name:(NSString *)name validatorString:(NSString *)string; 49 | + (NSError *)validateObject:(NSObject *)object name:(NSString *)name validator:(REValidator *)validator; 50 | + (NSArray *)validateObject:(NSObject *)object name:(NSString *)name validators:(NSArray *)validators; 51 | 52 | ///----------------------------- 53 | /// @name Handling Error Messages 54 | ///----------------------------- 55 | 56 | + (NSString *)errorMessageForDomain:(NSString *)domain; 57 | + (void)setErrorMessage:(NSString *)message forDomain:(NSString *)domain; 58 | + (void)setErrorMessages:(NSDictionary *)messages; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RECreditCardItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RECreditCardItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | 28 | typedef NS_ENUM(NSUInteger, RECreditCardType) { 29 | RECreditCardTypeUnknown, 30 | RECreditCardTypeVisa, 31 | RECreditCardTypeMasterCard, 32 | RECreditCardTypeAmex, 33 | RECreditCardTypeDiscover 34 | }; 35 | 36 | 37 | @interface RECreditCardItem : RETableViewItem 38 | 39 | // Appearance customization 40 | // 41 | @property (strong, readwrite, nonatomic) UIImage *expiredRibbonImage; 42 | 43 | // Data and values 44 | // 45 | @property (copy, readwrite, nonatomic) NSString *number; 46 | @property (copy, readwrite, nonatomic) NSString *expirationDate; 47 | @property (copy, readwrite, nonatomic) NSString *cvv; 48 | 49 | @property (assign, readwrite, nonatomic) RECreditCardType creditCardType; 50 | 51 | @property (assign, readwrite, nonatomic) BOOL cvvRequired; 52 | 53 | // Keyboard 54 | // 55 | @property (assign, readwrite, nonatomic) UIKeyboardAppearance keyboardAppearance; // default is UIKeyboardAppearanceDefault 56 | 57 | + (instancetype)itemWithNumber:(NSString *)number expirationDate:(NSDate *)expiration cvv:(NSString *)cvv; 58 | + (instancetype)itemWithNumber:(NSString *)number expirationString:(NSString *)expirationDate cvv:(NSString *)cvv; 59 | 60 | - (id)initWithNumber:(NSString *)number expirationDate:(NSString *)expirationDate cvv:(NSString *)cvv; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/REValidator.m: -------------------------------------------------------------------------------- 1 | // 2 | // REValidator.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REValidator.h" 27 | 28 | @interface REValidator () 29 | 30 | @property (strong, readwrite, nonatomic) NSDictionary *parameters; 31 | 32 | @end 33 | 34 | @implementation REValidator 35 | 36 | + (instancetype)validator 37 | { 38 | return [[self alloc] init]; 39 | } 40 | 41 | + (instancetype)validatorWithParameters:(NSDictionary *)parameters 42 | { 43 | REValidator *validator = [[self alloc] init]; 44 | validator.parameters = parameters; 45 | return validator; 46 | } 47 | 48 | + (instancetype)validatorWithInlineValidation:(NSError *(^)(id object, NSString *name))validation 49 | { 50 | REValidator *validator = [[self alloc] init]; 51 | validator.inlineValidation = validation; 52 | return validator; 53 | } 54 | 55 | + (NSString *)name 56 | { 57 | return @""; 58 | } 59 | 60 | + (NSError *)validateObject:(NSObject *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters 61 | { 62 | return nil; 63 | } 64 | 65 | + (NSError *)validateObject:(NSObject *)object variableName:(NSString *)name validation:(NSError *(^)(id object, NSString *name))validation 66 | { 67 | if (validation) 68 | return validation(object, name); 69 | return nil; 70 | } 71 | 72 | + (NSDictionary *)parseParameterString:(NSString *)string 73 | { 74 | return nil; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RERadioItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RERadioItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RERadioItem.h" 27 | #import "RETableViewManager.h" 28 | 29 | @implementation RERadioItem 30 | 31 | + (instancetype)itemWithTitle:(NSString *)title value:(NSString *)value selectionHandler:(void(^)(RERadioItem *item))selectionHandler 32 | { 33 | return [[self alloc] initWithTitle:title value:value selectionHandler:selectionHandler]; 34 | } 35 | 36 | - (id)initWithTitle:(NSString *)title value:(NSString *)value selectionHandler:(void(^)(RERadioItem *item))selectionHandler 37 | { 38 | self = [super init]; 39 | if (!self) 40 | return nil; 41 | 42 | self.title = title; 43 | self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 44 | self.selectionHandler = ^(RERadioItem *item) { 45 | [item.section.tableViewManager.tableView endEditing:YES]; 46 | if (selectionHandler) 47 | selectionHandler(item); 48 | }; 49 | self.value = value; 50 | self.style = UITableViewCellStyleValue1; 51 | 52 | return self; 53 | } 54 | 55 | - (void)setValue:(NSString *)value 56 | { 57 | _value = value; 58 | self.detailLabelText = value; 59 | } 60 | 61 | #pragma mark - 62 | #pragma mark Error validation 63 | 64 | - (NSArray *)errors 65 | { 66 | return [REValidation validateObject:self.value name:self.name ? self.name : self.title validators:self.validators]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REValidation/REValidation/Validators/RELengthValidator.m: -------------------------------------------------------------------------------- 1 | // 2 | // RELengthValidator.m 3 | // REValidation 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RELengthValidator.h" 27 | #import "NSError+REValidation.h" 28 | 29 | @implementation RELengthValidator 30 | 31 | + (NSString *)name 32 | { 33 | return @"length"; 34 | } 35 | 36 | + (NSDictionary *)parseParameterString:(NSString *)string 37 | { 38 | NSError *error = NULL; 39 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"(\\d+)" options:0 error:&error]; 40 | NSArray *matches = [regex matchesInString:string options:0 range:NSMakeRange(0, string.length)]; 41 | NSMutableArray *results = [NSMutableArray array]; 42 | for (NSTextCheckingResult *matchResult in matches) { 43 | NSString *match = [string substringWithRange:[matchResult range]]; 44 | [results addObject:match]; 45 | } 46 | if (results.count == 2) { 47 | return @{ @"min": results[0], @"max": results[1]}; 48 | } 49 | 50 | return nil; 51 | } 52 | 53 | + (NSError *)validateObject:(NSString *)object variableName:(NSString *)name parameters:(NSDictionary *)parameters 54 | { 55 | NSUInteger minimumValue = [parameters[@"min"] integerValue]; 56 | NSUInteger maximumValue = [parameters[@"max"] integerValue]; 57 | 58 | if (object.length < minimumValue && minimumValue > 0) 59 | return [NSError re_validationErrorForDomain:@"com.REValidation.minimumLength", name, minimumValue]; 60 | 61 | if (object.length > maximumValue && maximumValue > 0) 62 | return [NSError re_validationErrorForDomain:@"com.REValidation.maximumLength", name, maximumValue]; 63 | 64 | return nil; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /RETableViewManager/Items/REMultipleChoiceItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // REMultipleChoiceItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "REMultipleChoiceItem.h" 27 | #import "RETableViewManager.h" 28 | 29 | @implementation REMultipleChoiceItem 30 | 31 | + (instancetype)itemWithTitle:(NSString *)title value:(NSArray *)value selectionHandler:(void(^)(REMultipleChoiceItem *item))selectionHandler 32 | { 33 | return [[self alloc] initWithTitle:title value:value selectionHandler:selectionHandler]; 34 | } 35 | 36 | - (id)initWithTitle:(NSString *)title value:(NSArray *)value selectionHandler:(void(^)(REMultipleChoiceItem *item))selectionHandler 37 | { 38 | self = [super init]; 39 | if (!self) 40 | return nil; 41 | 42 | self.title = title; 43 | self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 44 | self.selectionHandler = ^(REMultipleChoiceItem *item) { 45 | [item.section.tableViewManager.tableView endEditing:YES]; 46 | if (selectionHandler) 47 | selectionHandler(item); 48 | }; 49 | self.value = value; 50 | self.style = UITableViewCellStyleValue1; 51 | 52 | return self; 53 | } 54 | 55 | - (void)setValue:(NSArray *)value 56 | { 57 | _value = value; 58 | 59 | if (value.count == 0) 60 | self.detailLabelText = @""; 61 | 62 | if (value.count == 1) 63 | self.detailLabelText = value[0]; 64 | 65 | if (value.count > 1) 66 | self.detailLabelText = [NSString stringWithFormat:NSLocalizedString(@"%i selected", @"%i selected"), value.count]; 67 | } 68 | 69 | #pragma mark - 70 | #pragma mark Error validation 71 | 72 | - (NSArray *)errors 73 | { 74 | return [REValidation validateObject:self.value name:self.name ? self.name : self.title validators:self.validators]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RECreditCardItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RECreditCardItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RECreditCardItem.h" 27 | #import "NSBundle+RETableViewManager.h" 28 | 29 | @implementation RECreditCardItem 30 | 31 | + (instancetype)itemWithNumber:(NSString *)number expirationDate:(NSDate *)expiration cvv:(NSString *)cvv { 32 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 33 | dateFormatter.dateFormat = @"MM/yy"; 34 | 35 | return [[self alloc] initWithNumber:number expirationDate:[dateFormatter stringFromDate:expiration] cvv:cvv]; 36 | } 37 | 38 | + (instancetype)itemWithNumber:(NSString *)number expirationString:(NSString *)expirationDate cvv:(NSString *)cvv 39 | { 40 | return [[self alloc] initWithNumber:number expirationDate:expirationDate cvv:cvv]; 41 | } 42 | 43 | + (instancetype)item 44 | { 45 | return [[self alloc] initWithNumber:@"" expirationDate:@"" cvv:@""]; 46 | } 47 | 48 | - (id)initWithNumber:(NSString *)number expirationDate:(NSString *)expirationDate cvv:(NSString *)cvv 49 | { 50 | self = [super init]; 51 | if (!self) 52 | return nil; 53 | 54 | self.number = number; 55 | self.expirationDate = expirationDate; 56 | self.cvv = cvv; 57 | self.cvvRequired = YES; 58 | 59 | return self; 60 | } 61 | 62 | - (UIImage *)expiredRibbonImage 63 | { 64 | if (!_expiredRibbonImage) { 65 | _expiredRibbonImage = [UIImage imageNamed:@"Ribbon_Expired" inBundle:[NSBundle RETableViewManagerBundle] compatibleWithTraitCollection:nil]; 66 | } 67 | return _expiredRibbonImage; 68 | } 69 | 70 | #pragma mark - 71 | #pragma mark Error validation 72 | 73 | - (NSArray *)errors 74 | { 75 | return [REValidation validateObject:self name:self.name ? self.name : self.title validators:self.validators]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RESegmentedItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // RESegmentedItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Dmitry Shmidt (https://github.com/shmidt) 6 | // Roman Efimov (https://github.com/romaonthego) 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 | // 26 | 27 | #import "RETableViewItem.h" 28 | 29 | @interface RESegmentedItem : RETableViewItem 30 | 31 | @property (assign, readwrite, nonatomic) NSInteger value; 32 | @property (copy, readwrite, nonatomic) NSArray *segmentedControlTitles; 33 | @property (copy, readwrite, nonatomic) NSArray *segmentedControlImages; 34 | @property (strong, readwrite, nonatomic) UIColor *tintColor; 35 | @property (copy, readwrite, nonatomic) void (^switchValueChangeHandler)(RESegmentedItem *item); 36 | 37 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler; 38 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value; 39 | 40 | - (id)initWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler; 41 | - (id)initWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value; 42 | 43 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler; 44 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value; 45 | 46 | - (id)initWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler; 47 | - (id)initWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value; 48 | 49 | @end -------------------------------------------------------------------------------- /RETableViewManager/Items/REDateTimeItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // REDateTimeItem.h 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "RETableViewItem.h" 27 | #import "REInlineDatePickerItem.h" 28 | 29 | @interface REDateTimeItem : RETableViewItem 30 | 31 | @property (strong, readwrite, nonatomic) NSDate *value; 32 | @property (strong, readwrite, nonatomic) NSDate *pickerStartDate; // date to be used for the picker when the value is not set; defaults to current date when not specified 33 | @property (copy, readwrite, nonatomic) NSString *placeholder; 34 | @property (strong, readwrite, nonatomic) NSString *format; 35 | @property (assign, readwrite, nonatomic) UIDatePickerMode datePickerMode; // default is UIDatePickerModeDateAndTime 36 | 37 | @property (strong, readwrite, nonatomic) NSLocale *locale; // default is [NSLocale currentLocale]. setting nil returns to default 38 | @property (copy, readwrite, nonatomic) NSCalendar *calendar; // default is [NSCalendar currentCalendar]. setting nil returns to default 39 | @property (strong, readwrite, nonatomic) NSTimeZone *timeZone; // default is nil. use current time zone or time zone from calendar 40 | 41 | @property (strong, readwrite, nonatomic) NSDate *minimumDate; // specify min/max date range. default is nil. When min > max, the values are ignored. Ignored in countdown timer mode 42 | @property (strong, readwrite, nonatomic) NSDate *maximumDate; // default is nil 43 | @property (assign, readwrite, nonatomic) NSInteger minuteInterval; // display minutes wheel with interval. interval must be evenly divided into 60. default is 1. min is 1, max is 30 44 | @property (copy, readwrite, nonatomic) void (^onChange)(REDateTimeItem *item); 45 | @property (assign, readwrite, nonatomic) BOOL inlineDatePicker; 46 | @property (strong, readwrite, nonatomic) REInlineDatePickerItem *inlinePickerItem; 47 | 48 | + (instancetype)itemWithTitle:(NSString *)title value:(NSDate *)value placeholder:(NSString *)placeholder format:(NSString *)format datePickerMode:(UIDatePickerMode)datePickerMode; 49 | - (id)initWithTitle:(NSString *)title value:(NSDate *)value placeholder:(NSString *)placeholder format:(NSString *)format datePickerMode:(UIDatePickerMode)datePickerMode; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/REFormattedNumberField/REFormattedNumberField/NSString+RENumberFormat.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RENumberFormat.m 3 | // REFormattedNumberFieldExample 4 | // 5 | // Created by Roman Efimov on 9/13/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "NSString+RENumberFormat.h" 10 | 11 | @implementation NSString (RENumberFormat) 12 | 13 | - (NSString *)re_stringWithNumberFormat:(NSString *)format 14 | { 15 | if (self.length == 0 || format.length == 0) 16 | return self; 17 | 18 | format = [format stringByAppendingString:@"X"]; 19 | NSString *string = [self stringByAppendingString:@"0"]; 20 | 21 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\D" options:NSRegularExpressionCaseInsensitive error:NULL]; 22 | NSString *stripped = [regex stringByReplacingMatchesInString:string options:0 range:NSMakeRange(0, string.length) withTemplate:@""]; 23 | 24 | NSMutableArray *patterns = [[NSMutableArray alloc] init]; 25 | NSMutableArray *separators = [[NSMutableArray alloc] init]; 26 | [patterns addObject:@0]; 27 | 28 | NSInteger maxLength = 0; 29 | for (NSInteger i = 0; i < [format length]; i++) { 30 | NSString *character = [format substringWithRange:NSMakeRange(i, 1)]; 31 | if ([character isEqualToString:@"X"]) { 32 | maxLength++; 33 | NSNumber *number = [patterns objectAtIndex:patterns.count - 1]; 34 | number = @(number.integerValue + 1); 35 | [patterns replaceObjectAtIndex:patterns.count - 1 withObject:number]; 36 | } else { 37 | [patterns addObject:@0]; 38 | [separators addObject:character]; 39 | } 40 | } 41 | 42 | if (stripped.length > maxLength) 43 | stripped = [stripped substringToIndex:maxLength]; 44 | 45 | NSString *match = @""; 46 | NSString *replace = @""; 47 | 48 | NSMutableArray *expressions = [[NSMutableArray alloc] init]; 49 | 50 | for (NSInteger i = 0; i < patterns.count; i++) { 51 | NSString *currentMatch = [match stringByAppendingString:@"(\\d+)"]; 52 | match = [match stringByAppendingString:[NSString stringWithFormat:@"(\\d{%ld})", (long)((NSNumber *)patterns[i]).integerValue]]; 53 | 54 | NSString *template; 55 | if (i == 0) { 56 | template = [NSString stringWithFormat:@"$%li", (long)i+1]; 57 | } else { 58 | unichar separatorCharacter = [separators[i-1] characterAtIndex:0]; 59 | template = [NSString stringWithFormat:@"\\%C$%li", separatorCharacter, (long)i+1]; 60 | 61 | } 62 | replace = [replace stringByAppendingString:template]; 63 | [expressions addObject:@{@"match": currentMatch, @"replace": replace}]; 64 | } 65 | 66 | NSString *result = [stripped copy]; 67 | 68 | for (NSDictionary *exp in expressions) { 69 | NSString *match = exp[@"match"]; 70 | NSString *replace = exp[@"replace"]; 71 | NSString *modifiedString = [stripped stringByReplacingOccurrencesOfString:match 72 | withString:replace 73 | options:NSRegularExpressionSearch 74 | range:NSMakeRange(0, stripped.length)]; 75 | 76 | if (![modifiedString isEqualToString:stripped]) 77 | result = modifiedString; 78 | } 79 | return [result substringWithRange:NSMakeRange(0, result.length - 1)]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /RETableViewManagerExample/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## REFormattedNumberField 5 | 6 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 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 | 26 | ## RETableViewManager 27 | 28 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 29 | 30 | Permission is hereby granted, free of charge, to any person obtaining a copy 31 | of this software and associated documentation files (the "Software"), to deal 32 | in the Software without restriction, including without limitation the rights 33 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 34 | copies of the Software, and to permit persons to whom the Software is 35 | furnished to do so, subject to the following conditions: 36 | 37 | The above copyright notice and this permission notice shall be included in 38 | all copies or substantial portions of the Software. 39 | 40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 45 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 46 | THE SOFTWARE. 47 | 48 | ## REValidation 49 | 50 | Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego). 51 | 52 | Permission is hereby granted, free of charge, to any person obtaining a copy 53 | of this software and associated documentation files (the "Software"), to deal 54 | in the Software without restriction, including without limitation the rights 55 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 56 | copies of the Software, and to permit persons to whom the Software is 57 | furnished to do so, subject to the following conditions: 58 | 59 | The above copyright notice and this permission notice shall be included in 60 | all copies or substantial portions of the Software. 61 | 62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 68 | THE SOFTWARE. 69 | Generated by CocoaPods - http://cocoapods.org 70 | -------------------------------------------------------------------------------- /RETableViewManagerExample/RETableViewManagerExample/Classes/Controllers/ListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ListViewController.m 3 | // RETableViewManagerExample 4 | // 5 | // Created by Roman Efimov on 3/17/13. 6 | // Copyright (c) 2013 Roman Efimov. All rights reserved. 7 | // 8 | 9 | #import "ListViewController.h" 10 | #import "ListHeaderView.h" 11 | #import "ListImageItem.h" 12 | 13 | @interface ListViewController () 14 | 15 | @property (strong, readwrite, nonatomic) RETableViewManager *manager; 16 | 17 | @end 18 | 19 | @implementation ListViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | self.title = @"List"; 25 | 26 | // Create manager 27 | // 28 | self.manager = [[RETableViewManager alloc] initWithTableView:self.tableView]; 29 | 30 | // Map item to a cell 31 | // 32 | self.manager[@"ListImageItem"] = @"ListImageCell"; // which is the same as [self.manager registerClass:@"ListImageItem" forCellWithReuseIdentifier:@"ListImageCell"]; 33 | 34 | // Set some UITableView properties 35 | // 36 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 37 | 38 | // Add table footer view 39 | // 40 | self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 58)]; 41 | [self.tableView.tableFooterView addSubview:({ 42 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 43 | button.frame = CGRectMake(40, 7, 240, 44); 44 | button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 45 | [button setTitle:@"Load more" forState:UIControlStateNormal]; 46 | [button addTarget:self action:@selector(loadMoreButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; 47 | button; 48 | })]; 49 | 50 | // Add items 51 | // 52 | [self addItems]; 53 | } 54 | 55 | - (void)addItems 56 | { 57 | NSArray *items = @[@{@"username": @"john", 58 | @"userpic": @"userpic1.jpg", 59 | @"image": @"photo1.jpg"}, 60 | 61 | @{@"username": @"mark", 62 | @"userpic": @"userpic2.jpg", 63 | @"image": @"photo2.jpg"}, 64 | 65 | @{@"username": @"william", 66 | @"userpic": @"userpic3.jpg", 67 | @"image": @"photo3.jpg"}, 68 | 69 | @{@"username": @"gretchen", 70 | @"userpic": @"userpic4.jpg", 71 | @"image": @"photo4.jpg"}, 72 | 73 | @{@"username": @"roman", 74 | @"userpic": @"userpic5.jpg", 75 | @"image": @"photo5.jpg"}, 76 | 77 | @{@"username": @"andrew", 78 | @"userpic": @"userpic6.jpg", 79 | @"image": @"photo6.jpg"} 80 | ]; 81 | 82 | for (NSDictionary *dictionary in items) { 83 | // Create section with a header view 84 | // 85 | ListHeaderView *headerView = [ListHeaderView headerViewWithImageNamed:dictionary[@"userpic"] username:dictionary[@"username"]]; 86 | RETableViewSection *section = [RETableViewSection sectionWithHeaderView:headerView]; 87 | [self.manager addSection:section]; 88 | 89 | // Add item (image) 90 | // 91 | [section addItem:[ListImageItem itemWithImageNamed:dictionary[@"image"]]]; 92 | } 93 | } 94 | 95 | #pragma mark - 96 | #pragma mark Button actions 97 | 98 | - (void)loadMoreButtonPressed:(id)sender 99 | { 100 | [self addItems]; 101 | [self.tableView reloadData]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /RETableViewManager/Items/RESegmentedItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // RESegmentedItem.m 3 | // RETableViewManager 4 | // 5 | // Copyright (c) 2013 Dmitry Shmidt (https://github.com/shmidt) 6 | // Roman Efimov (https://github.com/romaonthego) 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 | // 26 | 27 | #import "RESegmentedItem.h" 28 | 29 | @implementation RESegmentedItem 30 | 31 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value 32 | { 33 | return [[self alloc] initWithTitle:title segmentedControlTitles:titles value:value]; 34 | } 35 | 36 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler 37 | { 38 | return [[self alloc] initWithTitle:title segmentedControlTitles:titles value:value switchValueChangeHandler:switchValueChangeHandler]; 39 | } 40 | 41 | - (id)initWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value 42 | { 43 | return [self initWithTitle:title segmentedControlTitles:titles value:value switchValueChangeHandler:nil]; 44 | } 45 | 46 | - (id)initWithTitle:(NSString *)title segmentedControlTitles:(NSArray *)titles value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler 47 | { 48 | self = [super init]; 49 | if (!self) 50 | return nil; 51 | 52 | self.title = title; 53 | self.segmentedControlTitles = titles; 54 | self.value = value; 55 | self.switchValueChangeHandler = switchValueChangeHandler; 56 | 57 | return self; 58 | } 59 | 60 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value 61 | { 62 | return [[self alloc] initWithTitle:title segmentedControlImages:images value:value]; 63 | } 64 | 65 | + (instancetype)itemWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler 66 | { 67 | return [[self alloc] initWithTitle:title segmentedControlImages:images value:value switchValueChangeHandler:switchValueChangeHandler]; 68 | } 69 | 70 | - (id)initWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value 71 | { 72 | return [self initWithTitle:title segmentedControlImages:images value:value switchValueChangeHandler:nil]; 73 | } 74 | 75 | - (id)initWithTitle:(NSString *)title segmentedControlImages:(NSArray *)images value:(NSInteger)value switchValueChangeHandler:(void(^)(RESegmentedItem *item))switchValueChangeHandler 76 | { 77 | self = [super init]; 78 | if (!self) 79 | return nil; 80 | 81 | self.title = title; 82 | self.segmentedControlImages = images; 83 | self.value = value; 84 | self.switchValueChangeHandler = switchValueChangeHandler; 85 | 86 | return self; 87 | } 88 | 89 | @end 90 | 91 | --------------------------------------------------------------------------------