0
我有一個小問題,我試圖顯示與這樣的動畫視圖:beginAnimations:子視圖的動畫慢然後視圖的動畫
self.vistaAiuti = [[UIView alloc] initWithFrame:CGRectMake(10, -200, 300, 200)];
self.vistaAiuti.backgroundColor = [UIColor blueColor];
UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
closeButton.frame = CGRectMake(50, 140, 220, 40);
[closeButton setTitle:@"Go back" forState:UIControlStateNormal];
[closeButton addTarget:self action:@selector(closeView:) forControlEvents:UIControlEventTouchUpInside];
[self.vistaAiuti addSubview:closeButton];
[self.view addSubview:self.vistaAiuti];
[UIView beginAnimations:@"MoveView" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5f];
self.vistaAiuti.frame = CGRectMake(10, 0, 300, 200);
[UIView commitAnimations];
爲接近它,這樣的:
[UIView beginAnimations:@"MoveView" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5f];
self.vistaAiuti.frame = CGRectMake(10, -200, 300, 0);
[UIView commitAnimations];
問題是vista aiuto上的按鈕比vistaAiuti更慢,所以當我關閉視圖時,按鈕會保留一段時間......我需要做什麼以獲得相同的速度?
請填寫的問題。 – danh
對不起,我失去了一些單詞:(現在已完成! – kikko088