Skip to content

Question about touchesBegan in touchesEnded #75

@ronnie70

Description

@ronnie70

In the touchedEnded method, there's this code:

if (touchedLink)
{
        NSRange range = [[touchedLink objectForKey:KILabelRangeKey] rangeValue];
        NSString *touchedSubstring = [touchedLink objectForKey:KILabelLinkKey];
        KILinkType linkType = (KILinkType)[[touchedLink objectForKey:KILabelLinkTypeKey] intValue];
        
        [self receivedActionForLinkType:linkType string:touchedSubstring range:range];
}
else
{
        [super touchesBegan:touches withEvent:event];
}

What's the purpose of the "else" part? It causes problems, when embedding your KILabel in a UITableViewCell. didSelectCell is given the wrong indexPath at some point when tapping around the UITableView.
I commented the "else" part out, and all seems to work fine after that.

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