# TextFiledWithKeyBoard **Repository Path**: lgphp/TextFiledWithKeyBoard ## Basic Information - **Project Name**: TextFiledWithKeyBoard - **Description**: IOS中的在键盘上方显示输入框 类似于做快速评论用 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2014-12-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README //1.初始化 [IQKeyBoardManager installKeyboardManager]; //2.添加一个输入框 并让他不显示 textFiled = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; [self.view addSubview:textFiled]; //3.添加键盘上方输入框布局 __unsafe_unretained UITextField *tf = textFiled; [textFiled addTextFiled:^(UITextField *mTextFiled) { //点击输入框的回车之后 回调回来的内容 [[[iToast makeText:[NSString stringWithFormat:@"输入的内容:%@",mTextFiled.text]] setGravity:iToastGravityCenter] show]; [tf resignFirstResponder]; }]; //4.显示键盘 [textFiled becomeFirstResponder]; ![img](http://git.oschina.net/gejw0623/TextFiledWithKeyBoard/blob/master/TextFiledWithKeyBoard/screen.jpg)