我想讓UIView從屏幕底部向上滑動(並保持在屏幕中間),就像UIActionSheet一樣。我怎樣才能做到這一點?如何從UIActionSheet的屏幕底部顯示UIView?
UPDATE: 我使用下面的代碼:
TestView* test = [[TestView alloc] initWithNibName:@"TestView" bundle:nil];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
test.view.center = CGPointMake(160,100);
//test.view.frame = CGRectMake(0, 0, 160, 210);
[[[UIApplication sharedApplication] keyWindow] addSubview:test.view];
[UIView commitAnimations];
的觀點似乎從角落和動畫出現在角落裏。我怎樣才能讓它從底部向上滑動?越來越接近!
更新後一些代碼,應該幫助 – iwasrobbed 2010-07-28 22:55:20
另一個很好的例子:http://github.com/homeyer/CustomUIActionSheet – 2010-07-29 04:19:33