# FormatterInputView **Repository Path**: jbxb/formatter-input-view ## Basic Information - **Project Name**: FormatterInputView - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: swift - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-01 - **Last Updated**: 2024-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: Swift ## README # FormatterInputView #### 介绍 FormatterInputView 格式化输入框 #### 软件架构 软件架构说明 #### 安装教程 pod 'FormatterInputView', :git => 'https://gitee.com/jbxb/formatter-input-view.git' #### 使用说明 1. 创建 ```object-c FormatterInputView *dateInputView = [[FormatterInputView alloc] init]; [dateInputView setDelegate:self]; [dateInputView setFormat:@"####年##月##日"]; ``` 2. FormatterProtocol ```object-c @protocol FormatterProtocol /// 显示主视图 /// @param inputView inputView description /// @param index 索引 - (id)item:(FormatterInputView *)inputView forIndex:(int)index; /// 显示主视图大小 /// @param inputView inputView description /// @param index 索引 - (CGSize)itemSize:(FormatterInputView *)inputView forIndex:(int)index; /// 占位符视图 /// @param inputView inputView description /// @param index 索引 - (id)placeholder:(FormatterInputView *)inputView forIndex:(int)index; /// 占位符视图大小 /// @param inputView inputView description /// @param index 索引 - (CGSize)placeholderSize:(FormatterInputView *)inputView forIndex:(int)index; @optional /// 格式化字符-占位符 /// @param inputView inputView description - (NSString *)formatterPlaceholder:(FormatterInputView *)inputView; /// 光标颜色 默认黑色 /// @param inputView inputView description - (UIColor *)caretColor:(FormatterInputView *)inputView; /// 校验输入 /// @param inputView inputView description - (NSString *)check:(FormatterInputView *)inputView; /// 输入完成后调用 /// @param inputView inputView description - (void)formatterInputViewDidComplete:(FormatterInputView *)inputView; ```