I too tested your code
-(void)viewDidLoad
{
UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longTap)];
[longPressGesture setMinimumPressDuration:1];
[self.tempView addGestureRecognizer:longPressGesture];
[self.tempView setUserInteractionEnabled:YES];
}
-(void)longTap
{
NSLog(@"tapped");
}
my longTap method is getting called... If your stil not working ,you could provide more code so I could have more look in it for your issue.