iOS 被键盘遮挡时,带有textfield的tableview自动上移
来源:互联网 发布:andrew marc牌子知乎 编辑:程序博客网 时间:2024/04/30 11:05
- (void)textFieldDidBeginEditing:(nonnull UITextField *)textField{
UITableViewCell * cell=(UITableViewCell *)[[textField superview] superview];
NSIndexPath *indexPath=[self.myTableView indexPathForCell:cell];
if (indexPath.section==0) {
}else {
[UIView beginAnimations:@"ResizeForKeyBoard" context:nil];
[UIView setAnimationDuration:0.30f];
_point = self.myTableView.center;
self.myTableView.center = CGPointMake(SCREENSIZE.width, 120);
[UIView commitAnimations];
}
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
UITableViewCell * cell=(UITableViewCell *)[[textField superview] superview];
NSIndexPath *indexPath=[self.myTableView indexPathForCell:cell];
if (indexPath.section==0) {
}else {
[UIView beginAnimations:@"ResizeForKeyBoard" context:nil];
[UIView setAnimationDuration:0.30f];
self.myTableView.center = _point;
[UIView commitAnimations];
}
}
UITableViewCell * cell=(UITableViewCell *)[[textField superview] superview];
NSIndexPath *indexPath=[self.myTableView indexPathForCell:cell];
if (indexPath.section==0) {
}else {
[UIView beginAnimations:@"ResizeForKeyBoard" context:nil];
[UIView setAnimationDuration:0.30f];
_point = self.myTableView.center;
self.myTableView.center = CGPointMake(SCREENSIZE.width, 120);
[UIView commitAnimations];
}
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
UITableViewCell * cell=(UITableViewCell *)[[textField superview] superview];
NSIndexPath *indexPath=[self.myTableView indexPathForCell:cell];
if (indexPath.section==0) {
}else {
[UIView beginAnimations:@"ResizeForKeyBoard" context:nil];
[UIView setAnimationDuration:0.30f];
self.myTableView.center = _point;
[UIView commitAnimations];
}
}
0 0
- iOS 被键盘遮挡时,带有textfield的tableview自动上移
- 如何实现被键盘遮挡时,带有textfield的tableview自动上移(转自cocoaChina)
- iOS开发 textField被键盘遮住的时候自动上移
- iOS开发tableView的cell里面有textField,键盘出现的时候,自动上移
- [ios]TableView的Cell中有Textfield时放置键盘遮挡输入框
- iOS TextField 弹出键盘时实现view整体上移下移:防止弹出键盘遮挡输入框
- UITextField 被键盘挡住时自动上移调整textField frame
- 当textField输入框被键盘遮挡时 让整个view上移
- UITableView键盘遮挡 自动上移
- TableView的Cell中有Textfield、TextView时放置键盘遮挡输入框
- iOS TextField输入框点击键盘时随着键盘上移
- UITextField,UITextView,UISearchBar实现键盘的自动隐藏以及遮挡时自动上移的功能
- uitextfield 键盘遮挡时上移
- iOS开发:TextField随着键盘的弹出上移
- Cordova iOS 应用在第三方输入法的键盘弹出(点击输入框)时,页面不上移,导致输入框被键盘遮挡 的解决办法
- 输入框被键盘遮挡时 让整个view上移
- 键盘弹出时textfield也随着上移,键盘隐藏时,textfield回到原来的位置
- IOS开发 textField 键盘遮挡问题
- mongodb安装初步
- Android getDimensionPixelSize, 代码中设置字体大小,读xml配置。
- vc 网络连接的测试方法
- oracle按时间段查询
- MATLAB中的分类器
- iOS 被键盘遮挡时,带有textfield的tableview自动上移
- 请问两个div之间的上下距离怎么设置
- 抓取网页信息并获取生成xml文件(以网页彩票数据为例)
- android中actionBar中字体颜色设置
- LintCode:最小路径和
- 【IOS 开发学习总结-OC-39】★★ios开发之 MVC 模式
- webrtc sip html5
- ZOJ 3778 Talented Chef(计算器模拟)
- kafka深度解析