TPKeyboardAvoiding第三方库使用

TPKeyboardAvoiding 第三方库的下载地址:https://github.com/michaeltyson/TPKeyboardAvoiding

1,cocospods 安装  pod 'TPKeyboardAvoiding'   (或者直接拖入库文件即可)

2,将你工程代码中的 UIScrollView 替换成 TPKeyboardAvoidingScrollView(因为他是继承自UIScrollView的,所以UIScrollView的方法可以继续使用)

注意:确保你所有的控件都是添加到TPKeyboardAvoidingScrollView 上面的(因为是根据UIScrollView来做整体的修改frame的大小来移动的)

posted on 2016-10-14 11:38  冰棍超人  阅读(561)  评论(0)    收藏  举报

导航