UILongPressGestureRecognizer と UIPanGestureRecognizer で問題が発生しました。
self.view を長押しして、self.view に UIPanGestureRecognizer を含むビューを追加したいと考えています。
ただし、UIPanGestureRecognizer は認識していません。
私は何かを逃しましたか?
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    //[self initImagesAndGesture];
    UILongPressGestureRecognizer *tapRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(addImgView:)];
    tapRecognizer.numberOfTouchesRequired = 1;
    tapRecognizer.minimumPressDuration = 0.7;
    [tapRecognizer setDelegate:self];
    self.view.userInteractionEnabled = YES;
    [self.view addGestureRecognizer:tapRecognizer];   
}
-(void)addImgView:(UILongPressGestureRecognizer *)recognizer
{
    NSLog(@"tappppp");
    if(UIGestureRecognizerStateBegan == recognizer.state) {
        // Called on start of gesture, do work here
        NSLog(@"UIGestureRecognizerStateBegan");
        UIImage *img = [UIImage imageNamed:@"beer.png"];
        UIImageView *imgView = [[UIImageView alloc]initWithImage:img];
        UILabel *timeStamp = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 30, 30)];
        timeStamp.text = [NSString stringWithFormat:@"%f",[NSDate date]];
        UIView *drinkView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
        [drinkView setUserInteractionEnabled:YES];
        CGPoint tapLocation = [recognizer locationInView:recognizer.view];
        [timeStamp setCenter:CGPointMake(tapLocation.x, tapLocation.y)];
        [imgView setCenter:CGPointMake(tapLocation.x,tapLocation.y)];
        [drinkView addSubview:imgView];
        [drinkView addSubview:timeStamp];
        [drinkView setUserInteractionEnabled:YES];
        [imgView setUserInteractionEnabled:YES];
        [timeStamp setUserInteractionEnabled:YES];
        UIPanGestureRecognizer *recognizer1 = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(handlePan1:)];
        [recognizer1 setDelegate:self];
        [drinkView addGestureRecognizer:recognizer1];
        [self.view addSubview:drinkView];
    }
}