博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
收起键盘
阅读量:7219 次
发布时间:2019-06-29

本文共 806 字,大约阅读时间需要 2 分钟。

#pragma mark UItextFieldDelegate

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{    CGFloat height = self.view.frame.size.height;    CGFloat offset = height - (_OtherTextField.frame.origin.y + _OtherTextField.frame.size.height + 216+100);    if (offset<=0) {        [UIView animateWithDuration:0.3 animations:^{            CGRect frame = self.view.frame;            frame.origin.y = offset;            self.view.frame = frame;        }];    }    return YES;}- (BOOL)textFieldShouldEndEditing:(UITextField *)textField{    [UIView animateWithDuration:0.3 animations:^{        CGRect frame = self.view.frame;        frame.origin.y = 0.0;        self.view.frame = frame;    }];    return YES;}

  

2,点击收起

[_OtherTextField resignFirstResponder];

转载于:https://www.cnblogs.com/conan0919/p/5121729.html

你可能感兴趣的文章
centos7 python2和python3共存
查看>>
rhel6.2配置在线yum源
查看>>
分级聚类算法
查看>>
Web Services 入门(之二)
查看>>
随机模拟MCMC和Gibbs Sampling
查看>>
网络安全是一种态度
查看>>
POJ1131 Octal Fractions
查看>>
mysql-ulogd2.sql
查看>>
119. Pascal's Triangle II - Easy
查看>>
349. Intersection of Two Arrays - Easy
查看>>
[算法练习]最长公共子串(LCS)
查看>>
p转c++
查看>>
树(tree)
查看>>
codevs——2645 Spore
查看>>
ssh服务之 远程登录和端口转发
查看>>
java环境配置正确,但是tomcat不能启动的解决办法
查看>>
我就是想找个人聊聊天,说说我这近四年来的经历
查看>>
不同的测试方法使用的场景
查看>>
Hadoop快速入门
查看>>
Problem S
查看>>