//周期性
-(void)createViewCyclicityFirstResponder
{
// 为页面视图添加手势,当点击页面任何一处时收回键盘
[self removeKeyboardAndAlertView];
addEventTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(cancelViewCyclicityFirstResponder)];
addEventTapGesture.delegate = self;
addEventTapGesture.cancelsTouchesInView = YES;
viewBackAddEvent=[[UIView alloc]initWith :CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
[viewBackAddEvent setBackgroundColor:[UIColor colorWithRed:35/255.0 green:35/255.0 blue:35/255.0 alpha:0.6]];
[viewBackAddEvent addGestureRecognizer:addEventTapGesture];
[[[UIApplication sharedApplication].windows first ] addSubview:viewBackAddEvent];
//这句话是view覆盖全屏
//下拉菜单
self.cyclicityView = [[UIView alloc] initWith :CGRectMake(30, (viewBackAddEvent. .size.height)/2-64, self.view. .size.width-60, 200)];
self.cyclicityView.backgroundColor = [UIColor whiteColor];
[viewBackAddEvent addSubview:self.cyclicityView];
}
-(void)cancelViewCyclicityFirstResponder
{
[viewBackAddEvent removeFromSuperview];
}