Было бы полезно лучше объяснить «действительно странный путь» здесь. Похоже, ваша цель состоит в том, чтобы переместить currentView в определенное место и затем ваш обзор исчез? Вы хотели использовать self.view или currentView в обоих случаях?
Не используйте NSTimer здесь. NSTimers не подходят для анимации. Используйте +setAnimationDidStopSelector:
. Примерно так:
- (void) hideMenu {
UIView *currentView = [self view];
[UIView beginAnimations:@"hideMenu" context:currentView];
[UIView setAnimationDuration: 0.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[currentView setFrame:CGRectMake(0, 480, [currentView bounds].size.width, [currentView bounds].size.height)];
[UIView commitAnimations];
}
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
[self.view removeFromSuperview];
NSLog(@"removed the view");
}