GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - youngsoft/YSTextInputKeyboardCategory: UITextField,UITextView keyboard auto hidden and view auto moving offset。You need not write any code, just add UIView+YSTextInputKeyboard.h and UIView+YSTextInputKeyboard.m in project。

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
YSTextInputKeyboardCategory.xcodeproj
YSTextInputKeyboardCategory.xcodeproj
 
 
YSTextInputKeyboardCategory
YSTextInputKeyboardCategory
 
 
YSTextInputKeyboardCategoryTests
YSTextInputKeyboardCategoryTests
 
 
README.md
README.md
 
 

Repository files navigation

YSTextInputKeyboardCategory

UITextField,UITextView keyboard auto hidden and view auto moving offset。You need not write any code, just add UIView+YSTextInputKeyboard.h and UIView+YSTextInputKeyboard.m in project。

Overview

众所周知,iOS的UITextField,UITextView这两个控件在获得焦点时键盘会弹出,并且当这两个控件在屏幕的下方时有可能键盘会遮挡住视图,因此我们要 负责编码让控件失去焦点后键盘隐藏,以及让视图进行一定范围的移动。有了YSTextInputKeyboardCategory这个UIView的分类后,这两个控件的键盘 隐藏和自动移动功能都不再需要编码了。!!!你唯一要做的就是把UIView+YSTextInputKeyboard.h和UIView+YSTextInputKeyboard.m这两个文件加入到你的 工程中,什么也不要做。问题解决!!!

Function

这个分类默认扩展了UIView的一个只读属性kbMoving,这个属性可以可以设置键盘弹出并遮挡住视图时哪个视图会往上移动,并且移动多少值。系统默认设置 为当视图遮挡时其父视图往上移动,并且默认的偏移量是50. 您也可以实现自定义视图的键盘遮挡和移动机制,具体参考类定义头文件中的描述。 如果您要在UITableViewCell中使用UITextField,UITextView的话,请将UITextField或UITextView的.kbMoving.kbMovingView = tableView

About

UITextField,UITextView keyboard auto hidden and view auto moving offset。You need not write any code, just add UIView+YSTextInputKeyboard.h and UIView+YSTextInputKeyboard.m in project。

Resources

Readme
Activity

Stars

92 stars

Watchers

10 watching

Forks

33 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.