-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from MonoHelixLabs/linemode
New feature: control how the lines between data points are drawn
- Loading branch information
Showing
14 changed files
with
396 additions
and
22 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
DataFeeds-iOS/Assets.xcassets/plotsettings.imageset/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "plotsettings40pt.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "plotsettings80pt.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "plotsettings120pt.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+3.81 KB
DataFeeds-iOS/Assets.xcassets/plotsettings.imageset/plotsettings120pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
DataFeeds-iOS/Assets.xcassets/plotsettings.imageset/plotsettings40pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.34 KB
DataFeeds-iOS/Assets.xcassets/plotsettings.imageset/plotsettings80pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// PlotSettingsViewController.swift | ||
// DataFeeds | ||
// | ||
// Created by Paula on 21/07/2017. | ||
// Copyright © 2017 monohelixlabs. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
|
||
class PlotSettingsViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate { | ||
|
||
@IBOutlet weak var lineModePicker: UIPickerView! | ||
|
||
var pickerData = [ | ||
["Horizontal Bezier","Linear","Stepped"] | ||
] | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
self.navigationController?.navigationBar.barTintColor = UIColor(red: 0.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0) | ||
self.navigationController?.navigationBar.isTranslucent = false | ||
self.navigationController?.navigationBar.tintColor = UIColor.black | ||
self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white] | ||
|
||
lineModePicker.delegate = self | ||
lineModePicker.dataSource = self | ||
|
||
} | ||
|
||
override func viewDidAppear(_ animated: Bool) { | ||
lineModePicker.selectRow(UserDefaultsManager.sharedInstance.getLineMode(), inComponent: 0, animated: false) | ||
} | ||
|
||
func numberOfComponents(in pickerView: UIPickerView) -> Int { | ||
return pickerData.count | ||
} | ||
|
||
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { | ||
return pickerData[component].count | ||
} | ||
|
||
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { | ||
return pickerData[component][row] | ||
} | ||
|
||
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) | ||
{ | ||
UserDefaultsManager.sharedInstance.setLineMode(lineModePicker.selectedRow(inComponent: 0)) | ||
} | ||
} |
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
Oops, something went wrong.