Challenge Overview
Summary
This challenge will be focused on building the UI and related functionality for the goal setting and tracking screens. For all api calls please use the Apiary documentation. Reference the Invision Design for application look/feel and navigation flow.
Main Goals Screen
This screen is where the user can track their current and past progress for their goals. InVision references here.
-- The top bar of the view should allow the user to scroll through previous months and back. It should default to the current month and the user can only otherwise view past months.
-- The user should be able to select Jumps or Calories goal. when selecting a new category the title should animate and scroll left or right. The view should then appropriately populate with the new data.
-- Under the goal category slide navigation should be the user's current goal.
-- The goal graph should display the following:
-- The outer blue/gray circle represents the current progress towards your goals for the month. 100% + of the goal should be represented by a full blue circle.
-- If there is less than 100% of the goal completed, the total progress should be represented with a blue arc drawn for the percentage that is complete.
-- If there is less than 100% of the goal completed, the total remaining to complete should be represented with a gray arc drawn for the percentage remaining, and filling in the remaining space from the blue circle.
-- The Center of the circle should display the current number of jumps (or calories burned depending on the current category) followed by the percentage towards monthly goal. (e.g. “1000 Jumps\n10%”)
-- If there isn't any data for the month being viewed, display "No jumps yet this month: in the center of the circle
-- A gesture recognizer should be added to this goal graph that allows the user to swipe between three different representations of the graph, affecting the inner orange circle:
-- The default as outlined above should show the current progress of the goal, and draw the an arc for the same percentage as the blue arc in the outer circle.
-- The second should show the most recent jump entry towards the goal (last jump session). The blue circle should remain the same, but the orange should be reduced to show the progress made during that session.
-- The orange arc should end at the tail of the blue arc, and be drawn only for the percentage of jumps/calories that represents their jumps/calories of the last session.
-- The third should show the remaining jumps / calories needed to finish the goal. The blue circle should remain the same but the orange circle should fill to represent the remaining jumps / calories left in the goal.
-- The orange arc should mirror the gray portion of the outer circle in this portion. If the goal is 100% complete, no orange arc needs to be drawn for this.
-- In the Invision prototype app, there is a fourth graph representing days. This is not needed for the challenge.
-- The graph should be animated each refresh from 12 o’clock to the current position for both time and goal progress. A refresh includes swiping between the 3 graph representations.
-- Here is an example of how to make a ring graph using core graphics; this should be enough to get started.
-- Clicking on Jump History should push to the existing Jump History screen.
-- Clicking edit in the upper right corner should pop open a modal from the button.
Edit My Goals Screen
This screen allows the user to set their monthly goals.
-- The user should be able to swipe the ruler to change their monthly goal for number of jumps. This ruler has already been developed in a previous screen (fitness settings). see FitnessSettingsViewController.swift.
-- In the next section the user can update their calorie goal. The user can only do this if they have already updated their fitness settings with body type and height.
-- If the user has not set their fitness settings then the section should be disabled and a button should be visible to edit their fitness settings.
-- Clicking on this button pushes the already existing fitness settings page into the current modal. The user should then have the ability to update, save or go back.
-- Once the user has updated their fitness settings they can update their calorie goal. The Calorie goal should always default to 0. A goal of 0 should disable the calorie goal functionality and it should not be visible on the main goal screen.
-- Clicking save should update the goal data and reload the main Goals screen.
-- Clicking close dismisses the modal.
-- If the user closes the modal and has made changes an alert should be displayed asking the user if they would like to save before closing. (See “Settings” for similar functionality).
-- The bottom of the screen should have a save button, similar to the other save/actions buttons in the application. (see “Buy Jump Time”, “Settings” or “Payments & Funds”).
-- Clicking save performs an update profile call with the updated fitness settings (see ProfileApi.swift).
-- The standard loading screen (see LoadingView in HelpfulFunctions.swift) should display while calling to the service, then the modal should close if successful. If an error occurs, it should display the error in an alert.
-- The Repeat Schedule section at the bottom of the screen does not to be implemented and can be omited.
Assets
All image assets required for this challenge should already be in the application bundle. If you believe something is missing, please post to the forums.
Navigation
The user should be able to navigate to the goals section from either the radial menu (bottom of Profile screen) or from the Profile screen itself. The Goals screens should then replace the current view controller and have the functionality to open the side navigation menu. The Goals screen should also have the radial menu.
Data
Data for this app currently comes from the mock service in Apiary. Please be sure to mimic the existing REST service handling that exists in the application. For this challenge focus on the following endpoints:
Create Account/Login/Profile
"fitness":
{
"bodyType": 0,
"height": 71,
"jumpGoal": 140000,
"calorieGoal": 4800
}
-- A new fitness object has been added to these responses. The profile and userInfo objects will need to be updated in order to handle this data (Profile.swift & UserInfo.swift).
-- The fitness settings screen, under the Settings section and Goals section should also display this information (FitnessSettingsViewController.swift).
-- Body Type relates to the body type selector in the fitness settings screen. 0 being the smallest, 2 the largest.
-- Height is in inches.
Goals
{
"date": "2015-05",
"jump": {
"goal": 30000,
"currentProgress": 21375
},
"calorie": {
"goal": 4800,
"currentProgress": 3400
},
"lastSession": {
"date": "2015-05-20",
"numberOfJumps": 8798,
"numberOfCalories": 521,
"parkName": "Plainfield",
"startTime": "13:00",
"endTime": "14:00"
}
}
Goals can be retrieved using the goals api [GET] /profile/{CustomerId}/goals. This will return an array of goal data separated by months. The call will return all months that the users has been active.
-- Some months may not have a goal for jumps and/or calories. Also there may not be a last sessions if the user did not jump that month.
-- Date is in the format yyyy-MM
-- Last Session can be translated to a Jump Session object in the project (JumpSession.swift).
-- Goals can change from month to month. The goals in the fitness object of the Profile data is the user’s current goals.
Setup
-- Send an email to blainer and harrywynn request to be added to the Sky Zone team on Gitlab if you are not already a member
-- Once added to the team, fork the repository and work off of the Goals branch
-- Add blainer and harrywynn as members of your forked repository
-- Reference the Invision mockups here for look/feel and navigation flow
Final Submission Guidelines
-- All code should be written in Swift and be well commented
-- Use the workspace setup in the repository for development
-- Code must compile against iOS SDK 8.3 with a target for 8.0
-- Use auto layout and size classes to fit iPhone 5/5s, 6 and 6+
-- Use storyboards for all views and navigation, please create a new storyboard for this MVC and provide code to access it in the ContainterViewController file. There is an extension to UIStoryboard at the end of the file.
-- Please make sure all storyboards are ready to be localized and all string are localized using NSLocalizedString and the Localizable.strings file. Nothing needs to be translated.
-- Application should be locked to portrait orientation
-- Upload your source project as a zip
-- Include your Gitlab username and URL of your forked repository in your final documentation
-- Provide a video overview of your submission
-- Upon being selected as the winner you will be required to merge the dev branch into your Goals branch, then do a merge request on Gitlab