Coder Social home page Coder Social logo

brynbellomy / ios-draganddrop Goto Github PK

View Code? Open in Web Editor NEW
115.0 11.0 30.0 607 KB

Versatile, easily configurable drag and drop classes for iPhone and iPad.

Home Page: http://robotbubblesort.tumblr.com/post/26340913733/drag-and-drop-on-ios

Ruby 0.84% Objective-C 99.16%

ios-draganddrop's Issues

Is it still working?

I would ike to know if this project is still working. Maybe I'm doing something wrong.

The DraggableObjects start at the top left of the screen, and when I drag them, they disappear.

here is my code:

    for(int i = 0; i < 5; i++) {
        NSString *letterpng = [NSString stringWithFormat:@"letter_%@.png", [(NSString *) [m_aVraagLijst objectAtIndex:i +1] lowercaseString]];

        // Create rect for homelocation and Draggable image
        CGRect frame = CGRectMake( 20 +(i*56), 390, 50, 38 );

        // create imageview for DraggableObject
        UIImageView *letterImage = [[UIImageView alloc] initWithFrame:frame];
        [letterImage setImage:[UIImage imageNamed:letterpng]];

        // Create draggable object with image
        SEDraggable *draggable = [[SEDraggable alloc] initWithImageView:letterImage];   
        draggable.tag = i;
        draggable.shouldSnapBackToHomeLocation = YES;

        // create home location for Draggable Object to snap back to
        SEDraggableLocation *home = [[SEDraggableLocation alloc] initWithFrame:frame];
        [home addDraggableObject:draggable animated:YES];
        draggable.homeLocation = home;

        // set drop point for draggable object
        [letter1Draggable addAllowedDropLocation:antwoordLocatie1];

        // add draggable object to view
        [self.view addSubview:draggable];
    }
    antwoordLocatie1.shouldAcceptDroppedObjects = YES;

Sorting sedraggables on one location

Hello and thank you for such a great class! I just wanted to ask if it is possible to change items order on one draggable location by dragging them like it made in ios desktop icons? Thank you!

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.