Generate random squares, circles, and triangles
- A user should be able to spawn an infinite number of squares or circles filled with random colours or images.
- Application consists of 4 screens using a tab bar. The tabs are as follows:
- Squares - this screen only spawns squares.
- Circles - this screen only spawns circles.
- Triangles - this screen only spawns triangles.
- All - this screen spawns squares, circles and triangles randomly.
- Create squares, circles or triangles which randomly fill with random colours or images when the user taps on the main background.
- Created shapes are placed at the user's tapped location.
- Create a shape at a random size within appropriate ranges. A shape should not be more than 45% the width or height of the screen size and should never be less than 10% the width or height.
- Fill circles with a colour that is generated by calling the API from http://www.colourlovers.com/api/colors/random?format=json using either the RGB or Hex value
- Fill squares with an image that is generated by calling the API from http://www.colourlovers.com/api/patterns/random?format=json using the imageUrl value
- Fill triangles randomly either using the fill circle or fill square requirements above.
- If no connection is available from the above API urls, use code to generate random colours
- Double tapping the shape replaces the colour or image based on the above mentioned rules.
- When a user taps the screen, add an animation for the shapes that appear
- Remove all shapes when shaking the device
- Be able to move a shape around
- Allow a user to use the pinch action to enlarge or shrink the size of a shape
- Working app for both iOS and Android
- The current implementation does not draw real circles and triangles. They're still square View with circles and triangles above them. As a result, users cannot press on the remaining View to spawn new shapes.
- There's an issue with this item. After dragging a shape to another position, then press on its old position. The screen spawns a new shape at the incorrect position.