Created
March 25, 2014 15:38
-
-
Save mbcrump/9764456 to your computer and use it in GitHub Desktop.
Getting Started ViewController.m File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// GettingStarted | |
// | |
// Created by Michael Crump on 03/25/14. | |
// Copyright (c) 2013 Michael Crump. All rights reserved. | |
// | |
#import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
NSMutableArray *randomData = [[NSMutableArray alloc] init]; | |
for (int i=0; i<10; i++) { | |
[randomData addObject:[[TKChartDataPoint alloc] initWithX:@(i) Y:@(arc4random()%300)]]; | |
} | |
TKChartLineSeries *lineSeries = [[TKChartLineSeries alloc] initWithItems:randomData]; | |
_chartView.allowAnimations = YES; | |
_chartView.title.hidden = NO; | |
_chartView.title.text = @"Getting Started"; | |
[_chartView addSeries: lineSeries]; | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment