[self startTimer:@"5"];//启动定时器,定时5s
#pragma mark -- 定时5秒自动消失UI界面
- (void)startTimer:(NSString*)tempCount
{
[NSTimer scheduledTimerWithTimeInterval:1 target:[YYWeakProxy proxyWithTarget:self] selector:@selector(countDown:) userInfo:tempCount repeats:NO];
}
- (void)countDown:(id)sender
{
NSInteger _timeCount=[[sender userInfo]intValue] - 1;
if (_timeCount > 0)
{
[self startTimer:[NSString stringWithFormat:@"%ld",(long)_timeCount]];
}
else
{
[self hideView];
}
}