【发布时间】:2015-08-19 18:14:16
【问题描述】:
我的问题是我在使用 NSTimer 时要输入什么参数?我试过的任何东西都没有奏效。
v.AllTouchEvents += delegate { HideToast();};
NSTimer.CreateScheduledTimer (theSettings.DurationSeconds, HideToast);
void HideToast (NSTimer tr)
{
UIView.BeginAnimations ("");
view.Alpha = 0;
UIView.CommitAnimations ();
}
错误是:No overload for method 'HideToast' takes '0' arguments
【问题讨论】:
-
也许 v.AllTouchEvents += 委托 {HideToast(NSTimer);};是您的解决方案。
-
我试过了,但不幸的是没有奏效,因为 NSTimer 是一种类型而不是变量。
标签: c# compiler-errors arguments overloading