Skip to content

Add tap on the descirption #24

@johnny51925

Description

@johnny51925

I would like to add tap feature on the description label.
So that I can either click the button or label to trigger the function.

But as if I add the UITapGestureRecognizer on the description, it is not working

Would you mind help me have a check for the method?

- (void)setDescriptionsTap
{
    for (NSUInteger i=0; i<_descriptionsArray.count; i++)
    {
        [_descriptionsArray[i] setUserInteractionEnabled:true];
        UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(buttonActionForTap:)];
        tapGesture.delegate = self;
        [tapGesture.view setTag:i];
        [_descriptionsArray[i] addGestureRecognizer:tapGesture];

    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions