UIButton *more = [UIButton buttonWithType:UIButtonTypeCustom];
[more setImage:[UIImage imageNamed:@"btnmainmore.png"] forState:UIControlStateNormal];
more.frame = CGRectMake(self.view.frame.size.height - 80 -20, 90 + 50, 80, 40);
[more addTarget:self action:@selector(moreClick) forControlEvents:UIControlEventTouchUpInside];
//实例化长按手势监听
UILongPressGestureRecognizer *longGest = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(toucheMoreFiveScends)];
longGest.delegate = self;//设置代理
longGest.minimumPressDuration = 3.0;//设置按下时长
[more addGestureRecognizer:longGest];//给按钮绑定长按事件
[self.view addSubview:more];
#pragma mark 长按按钮3秒后跳转
-(void)toucheMoreFiveScends{
MyLog(@"长按了3秒");
}