GithubHelp home page GithubHelp logo

peterdeweese / es_ios_utils Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 5.0 862 KB

Categories and classes by Eye Street Research to assist in Cocoa Touch development.

Home Page: http://research.eyestreet.com

License: Other

Objective-C 100.00%

es_ios_utils's People

Contributors

jedinorton avatar jim0020 avatar pcg79 avatar peterdeweese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

es_ios_utils's Issues

ESFlowLayoutView.m

//Orders in rows. Could be improved to save initial widths for items that are too wide to fit a row.

  • (void)layoutSubviews
    {
    double rowY = padding;
    double maxHeight = 0.0;
    double curX = padding;
    int itemsInRow = 0;

    for(UIView *v in self.subviews)
    {
    //start a new row if needed. If the first item is too wide, present it regardless.
    if(itemsInRow>0 && curX+v.width > self.width)
    {
    rowY = maxHeight + padding;
    //maxHeight = 0.0;
    curX = padding;
    itemsInRow = 0;
    }

    v.y = rowY;
    v.x = curX;
    curX += v.width + padding;
    maxHeight = MAX(maxHeight, (v.height + v.y));
    itemsInRow++;
    

    }
    self.height = rowY + maxHeight + padding;
    }

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.