{"id":21802874,"url":"https://github.com/coderzhuxh/xhinputview","last_synced_at":"2025-04-13T18:51:35.483Z","repository":{"id":56927966,"uuid":"107666320","full_name":"CoderZhuXH/XHInputView","owner":"CoderZhuXH","description":"轻量级评论输入框,支持多种样式,支持占位符设置等等...","archived":false,"fork":false,"pushed_at":"2017-11-30T05:31:15.000Z","size":107,"stargazers_count":84,"open_issues_count":3,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T17:13:34.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoderZhuXH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-20T10:43:18.000Z","updated_at":"2023-05-26T04:12:04.000Z","dependencies_parsed_at":"2022-08-21T06:20:20.260Z","dependency_job_id":null,"html_url":"https://github.com/CoderZhuXH/XHInputView","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderZhuXH%2FXHInputView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderZhuXH%2FXHInputView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderZhuXH%2FXHInputView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderZhuXH%2FXHInputView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderZhuXH","download_url":"https://codeload.github.com/CoderZhuXH/XHInputView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248765983,"owners_count":21158296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T11:33:59.669Z","updated_at":"2025-04-13T18:51:35.457Z","avatar_url":"https://github.com/CoderZhuXH.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## 轻量级评论输入框,支持多种样式,支持占位符设置等等!\n\n[![AppVeyor](https://img.shields.io/appveyor/ci/gruntjs/grunt.svg?maxAge=2592000)](https://github.com/CoderZhuXH/XHInputView)\n[![Version Status](https://img.shields.io/cocoapods/v/XHInputView.svg?style=flat)](http://cocoadocs.org/docsets/XHInputView)\n[![Support](https://img.shields.io/badge/support-iOS%207%2B-brightgreen.svg)](https://github.com/CoderZhuXH/XHInputView)\n[![Pod Platform](https://img.shields.io/cocoapods/p/XHInputView.svg?style=flat)](http://cocoadocs.org/docsets/XHInputView/)\n[![Pod License](https://img.shields.io/cocoapods/l/XHInputView.svg?style=flat)](https://github.com/CoderZhuXH/XHInputView/blob/master/LICENSE)\n\n\n### 技术交流群(群号:537476189)\n\n\n## 效果\n\n\n![image](https://github.com/CoderZhuXH/XHInputView/blob/master/ScreenShot/样式一.png) ![image](https://github.com/CoderZhuXH/XHInputView/blob/master/ScreenShot/样式二.png)\n\n\n## 使用方法\n\n###   显示输入框\n\n```objc\n\n\n    //支持InputViewStyleDefault 与 InputViewStyleLarge 两种样式\n    [XHInputView showWithStyle:InputViewStyleDefault configurationBlock:^(XHInputView *inputView) {\n        /** 请在此block中设置inputView属性 */\n        \n        /** 代理 */\n        inputView.delegate = self;\n        \n        /** 占位符文字 */\n        inputView.placeholder = @\"请输入评论文字...\";\n        /** 设置最大输入字数 */\n        inputView.maxCount = 50;\n        /** 输入框颜色 */\n        inputView.textViewBackgroundColor = [UIColor groupTableViewBackgroundColor];\n        \n        /** 更多属性设置,详见XHInputView.h文件 */\n        \n    } sendBlock:^BOOL(NSString *text) {\n\n        if(text.length){\n            NSLog(@\"输入为信息为:%@\",text);\n            return YES;//return YES,收起键盘\n        }else{\n            NSLog(@\"显示提示框-你输入的内容为空\");\n            return NO;//return NO,不收键盘\n        }\n    }];\n\n```\n\n\n###   代理方法\u003cXHInputViewDelagete\u003e\n\n```objc\n\n/** XHInputView 将要显示 */\n-(void)xhInputViewWillShow:(XHInputView *)inputView\n{\n    \n     /** 如果你工程中有配置IQKeyboardManager,并对XHInputView造成影响,请在XHInputView将要显示时将其关闭 */\n    \n     //[IQKeyboardManager sharedManager].enableAutoToolbar = NO;\n     //[IQKeyboardManager sharedManager].enable = NO;\n\n}\n\n/** XHInputView 将要影藏 */\n-(void)xhInputViewWillHide:(XHInputView *)inputView{\n    \n     /** 如果你工程中有配置IQKeyboardManager,并对XHInputView造成影响,请在XHInputView将要影藏时将其打开 */\n    \n     //[IQKeyboardManager sharedManager].enableAutoToolbar = YES;\n     //[IQKeyboardManager sharedManager].enable = YES;\n}\n\n```\n\n###    更多属性设置\n\n```objc\n\n/** 最大输入字数 */\n@property (nonatomic, assign) NSInteger maxCount;\n/** 字体 */\n@property (nonatomic, strong) UIFont * font;\n/** 占位符 */\n@property (nonatomic, copy) NSString *placeholder;\n/** 占位符颜色 */\n@property (nonatomic, strong) UIColor *placeholderColor;\n/** 输入框背景颜色 */\n@property (nonatomic, strong) UIColor* textViewBackgroundColor;\n/** 发送按钮背景色 */\n@property (nonatomic, strong) UIColor *sendButtonBackgroundColor;\n/** 发送按钮Title */\n@property (nonatomic, copy) NSString *sendButtonTitle;\n/** 发送按钮圆角大小 */\n@property (nonatomic, assign) CGFloat sendButtonCornerRadius;\n/** 发送按钮字体 */\n@property (nonatomic, strong) UIFont * sendButtonFont;\n\n```\n##  安装\n### 1.手动添加:\u003cbr\u003e\n*   1.将 XHInputView 文件夹添加到工程目录中\u003cbr\u003e\n*   2.导入 XHInputView.h\n\n### 2.CocoaPods:\u003cbr\u003e\n*   1.在 Podfile 中添加 pod 'XHInputView'\u003cbr\u003e\n*   2.执行 pod install 或 pod update\u003cbr\u003e\n*   3.导入 XHInputView.h\n\n##  系统要求\n*   该项目最低支持 iOS 7.0 和 Xcode 7.0\n\n##  许可证\nXHInputView 使用 MIT 许可证，详情见 LICENSE 文件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderzhuxh%2Fxhinputview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderzhuxh%2Fxhinputview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderzhuxh%2Fxhinputview/lists"}