如何通过iPhone safari地址搜索栏等动画调整文本字段的大小?

如何通过iPhone safari地址搜索栏等动画调整文本字段的大小?,iphone,Iphone,可能与CoreAnimation有关 有人有这样的例子吗? 嗯,我是CA新手,所以任何接近这一点的例子都会有很大帮助。看看UIView动画。下面是一个例子: CGRect newBounds = myTextField.bounds; newBounds.size.width = NEWSIZE; //whatever you want the new width to be [UIView beginAnimations:nil context:nil]; myTextField.bound

可能与CoreAnimation有关

有人有这样的例子吗?
嗯,我是CA新手,所以任何接近这一点的例子都会有很大帮助。

看看
UIView
动画。下面是一个例子:

CGRect newBounds = myTextField.bounds;
newBounds.size.width = NEWSIZE; //whatever you want the new width to be

[UIView beginAnimations:nil context:nil];
myTextField.bounds = newBounds;
[UIView commitAnimations];

要将其放回,请保存原始的
边界
,并将其分配回
开始/提交动画
块内的文本字段。

查看
UIView
动画。下面是一个例子:

CGRect newBounds = myTextField.bounds;
newBounds.size.width = NEWSIZE; //whatever you want the new width to be

[UIView beginAnimations:nil context:nil];
myTextField.bounds = newBounds;
[UIView commitAnimations];
要将其放回,请保存原始的
边界
,并将其分配回
开始/提交
块内的文本字段