iPhone使用动画更改高度,而不是向下扫掠

iPhone使用动画更改高度,而不是向下扫掠,iphone,core-animation,Iphone,Core Animation,我正在使用代码: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:0.3]; [info setFrame:CGRectMake( 0, 96, 320, 384)]; [UIView commitAnimations]; 要获得对象“info”的动画,请将其高度更改为384。。。没有其他更改,但唯一的方法是更改整个帧,在动画中,

我正在使用代码:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:0.3];
[info setFrame:CGRectMake( 0, 96, 320, 384)];
[UIView commitAnimations];
要获得对象“info”的动画,请将其高度更改为384。。。没有其他更改,但唯一的方法是更改整个帧,在动画中,对象只是以适当的宽度和高度捕捉到屏幕顶部,并向下移动到位,而不是停留在原地,只是简单地增长。我怎样才能修复它,使它只是向下生长


编辑:该信息是一个UITextView,只有在未滚动到顶部时才会向下扫描。

而不是
[info setFrame:CGRectMake(0、96、320、384)]尝试
info.frame.size.height=384

尝试以下操作:

//... animation setup
CGRect frame = info.frame;
frame.size.height = 384;
info.frame = frame;
[UIView commitAnimations];

无法设置info.frame.size.height,因为.height属性是只读的。“赋值的左操作数需要左值”