Files
CRBoxInputView/PodCode/Classes/CRBoxInputView.h

75 lines
1.7 KiB
C
Raw Normal View History

2019-01-03 18:03:44 +08:00
//
// CRBoxInputView.h
// CRBoxInputView
//
// Created by Chobits on 2019/1/3.
// Copyright © 2019 Chobits. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CRBoxFlowLayout.h"
#import "CRBoxInputCellProperty.h"
2019-01-06 18:59:10 +08:00
#import "CRBoxInputCell.h"
2019-01-03 18:03:44 +08:00
@class CRBoxInputView;
typedef void(^TextDidChangeblock)(NSString *text, BOOL isFinished);
@interface CRBoxInputView : UIView
/**
2019-01-09 11:34:31 +08:00
ifNeedCursor
2019-01-04 15:28:43 +08:00
*default: YES
2019-01-03 18:03:44 +08:00
*/
@property (assign, nonatomic) BOOL ifNeedCursor;
/**
2019-01-09 11:34:31 +08:00
codeLength
2019-01-03 18:03:44 +08:00
default: 4
*/
@property (nonatomic, assign) NSInteger codeLength;
2019-01-03 19:44:13 +08:00
/**
2019-01-09 11:34:31 +08:00
ifNeedSecurity
2019-01-03 19:44:13 +08:00
default: NO
*/
@property (assign, nonatomic) BOOL ifNeedSecurity;
/**
2019-01-09 11:34:31 +08:00
show security delay time
2019-01-03 19:44:13 +08:00
default: 0.3
*/
@property (assign, nonatomic) CGFloat securityDelay;
2019-01-07 12:23:58 +08:00
/**
2019-01-09 11:34:31 +08:00
keyBoardType
2019-01-07 12:23:58 +08:00
default: UIKeyboardTypeNumberPad
*/
2019-01-03 19:44:13 +08:00
@property (assign, nonatomic) UIKeyboardType keyBoardType;
2019-01-07 12:23:58 +08:00
2019-01-10 23:51:17 +08:00
/**
textContentType
2019-01-10 23:52:50 +08:00
desc: You set this 'nil' or 'UITextContentTypeOneTimeCode' to auto fill verify code.
2019-01-10 23:51:17 +08:00
default: nil
*/
@property (null_unspecified,nonatomic,copy) UITextContentType textContentType NS_AVAILABLE_IOS(10_0);
2019-01-03 19:44:13 +08:00
@property (copy, nonatomic) TextDidChangeblock textDidChangeblock;
@property (strong, nonatomic) CRBoxFlowLayout *boxFlowLayout;
2019-01-04 15:28:43 +08:00
@property (strong, nonatomic) CRBoxInputCellProperty *customCellProperty;
2019-01-07 15:20:30 +08:00
@property (strong, nonatomic, readonly) NSString *textValue;
2019-01-03 18:03:44 +08:00
2019-01-04 16:05:34 +08:00
- (void)loadAndPrepareView;
- (void)clearAll;
2019-01-06 19:40:28 +08:00
- (UICollectionView *)mainCollectionView;
2019-01-04 16:05:34 +08:00
// Qiuck set
2019-01-04 15:46:16 +08:00
- (void)quickSetSecuritySymbol:(NSString *)securitySymbol;
2019-01-03 18:03:44 +08:00
2019-01-09 11:34:31 +08:00
// You can inherit and call super
2019-01-06 19:40:28 +08:00
- (void)initDefaultValue;
2019-01-09 11:34:31 +08:00
// You can inherit and rewrite
2019-01-06 19:40:28 +08:00
- (UICollectionViewCell *)customCollectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
2019-01-06 18:59:10 +08:00
2019-01-03 18:03:44 +08:00
@end