Charts on the storyboard

Now, we can design the graphical part of this view controller. Click on the storyboard and go to the view controller that is connected to the button with the title Your Progress. Open its Identity Inspector (command + option + 3) and change its class to WeeklyChartsViewController.

Charts on the storyboard

Drag three labels, three views and one button to the current view. Set the first label title to Number of Steps, the second one to Heart Rates, the third one to Weight, and the button to Close. Under each label, place UIView and change their class to LineChartView:

Connect the button to its corresponding method to close the scene and connect each ...

Get Swift 2 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.