BTUIKExpiryInputView.h 910 B

1234567891011121314151617181920212223
  1. #import <UIKit/UIKit.h>
  2. @protocol BTUIKExpiryInputViewDelegate;
  3. /// @class A UIView designed to be used as an `inputView` on a text field.
  4. /// This input view makes it possible to enter a valid expiration date with 2 taps by showing buttons for months and years.
  5. @interface BTUIKExpiryInputView : UIView <UITextFieldDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
  6. /// The selected year
  7. @property (nonatomic) NSInteger selectedYear;
  8. /// The selected month
  9. @property (nonatomic) NSInteger selectedMonth;
  10. /// The delegate that should receive expiryInputViewDidChange calls
  11. @property (nonatomic, weak) id<BTUIKExpiryInputViewDelegate> delegate;
  12. @end
  13. /// @protocol This protocol is required by the delegate to receive the expiryInputViewDidChange calls
  14. @protocol BTUIKExpiryInputViewDelegate <NSObject>
  15. - (void)expiryInputViewDidChange:(BTUIKExpiryInputView *)expiryInputView;
  16. @end