Git Product home page Git Product logo

Comments (4)

morgler avatar morgler commented on July 21, 2024

I was wondering why I couldn't tap the delete button, too. I tried to hit the buttons by using points, but still the delete button could not be tapped. It would be fantastic, if someone had a solution for this.

from kif.

rlgomes avatar rlgomes commented on July 21, 2024

This issue actually effects UISpec since they also issue a similar UIEvent to the button but for some reason its ignore the event, here are the details: https://groups.google.com/forum/#!topic/uispec/GrqeJdcL_84

I found that one solution is to add a workaround to the tap call so that it can detect the button being tapped on and do something slightly different, like so:

NSString *className = NSStringFromClass([[view superview ]class]);
if ([className isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {
    UITableViewCell* cell = (UITableViewCell*) [[view superview] superview];
    UITableView* table = (UITableView*) [cell superview];

    NSIndexPath* index = [table indexPathForCell: cell];

    [[table dataSource] tableView: table commitEditingStyle: UITableViewCellEditingStyleDelete forRowAtIndexPath:index];

} else { 

... default code
}

Basically if its a UITableViewCellDeleteConfirmationControl we then figure out where the TableView parent is and issue a delete on the row that we wanted to confirm the delete on... this is obviously ugly and hopefully in an SDK update they'd fix the button to respond as other buttons do.

I don't have the time to make the change but I'm certain someone familiar with the KIF codebase could quickly test this out and get this workaround in (if nothing else into an experimental branch?).

from kif.

scraton avatar scraton commented on July 21, 2024

As yes, calling the table view's delete method specifically, I hadn't thought of that. I did something similar to that to test a pull to refresh feature, and I suppose it'd work just the same for delete. Thanks for posting that @rigomes!

I'll see if I can hack that together and open a pull request for that sometime soon.

from kif.

bnickel avatar bnickel commented on July 21, 2024

Closing due to age.

from kif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.