Coder Social home page Coder Social logo

squarelayout's Introduction

Square Layout Problem

This app reads and parses the "square_hierarchy_structure.json" file and builds a corresponding square hierarchy layout


Assumptions

  • Made keywindow background color white
  • Added AlertView with message is json file is missing or syntactically incorrect

Considerations

  • Look at main queue vs background queue processing
    • Right now there is no user action that would be blocking. If there is such action, could look to not only doing the json parsing on the background queue, but also the calculation of the view placements and sizes. These values could be added to properties on the square object. The only thing that would needed to be done on the UI view then is adding the subviews.
  • Look at rotation
    • Tested rotation to all four orientations and they worked.
  • Look at experience on ios 5/6/7
    • Tested functionality on ios5, 6 and 7 and they worked.
  • Add unique id to square
    • Added unique identifier to square to allow for addition and removal of squares as a result of gesturerecognizers that would react to user interaction. Unique id is necessary to find the view that expeiences the tap and map to specific square, which then could be deleted or have subviews added to the object
  • Unit Tests
    • Did not add unit tests as part of this project, but unit tests could be added to validate that a created square matches the json requirements, that the number of squares match, that the square has proper subview squares, etc.

Tasks Undertaken

  • Base Case
  • Swiping to delete view and children
  • Tapping on any view to randomly insert 1-3 children
  • Long-pressing to be able to move view to different location in object hierarchy

squarelayout's People

Contributors

jnbyrnes avatar

Watchers

James Cloos avatar  avatar

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.