如何从另一个 .m 文件中调用它-(void){}
(函数、方法?抱歉,我忘记了术语)?
我也希望能够像这样在本地 .m 文件中调用它[self closeMenu];
这是-(void){}
:
-(void)closeMenu{
//close the menu
[UIView animateWithDuration:0.6 animations:^{
[UIView setAnimationBeginsFromCurrentState:YES]; // so it doesn't cut randomly, begins from where it is
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[menuView setFrame:CGRectMake(menuView.frame.origin.x, -menuView.frame.size.height, menuView.frame.size.width, menuView.frame.size.height)];
}];
}