Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Plots/Plot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ open class Plot {
}

private func dequeue(animation: GraphPointAnimation) {
if let index = currentAnimations.index(of: animation) {
if let index = currentAnimations.firstIndex(of: animation) {
currentAnimations.remove(at: index)
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Reference/LabelPool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class LabelPool {
else {
label = UILabel()
labels.append(label)
let newLabelIndex = labels.index(of: label)!
let newLabelIndex = labels.firstIndex(of: label)!
relations[pointIndex] = newLabelIndex
}

Expand Down
19 changes: 12 additions & 7 deletions GraphView/GraphView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,20 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1120;
TargetAttributes = {
2918399D1C72E6A400753A45 = {
CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
};
E10847832129DC60009A9586 = {
LastSwiftMigration = 1120;
};
};
};
buildConfigurationList = 291839991C72E6A400753A45 /* Build configuration list for PBXProject "GraphView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -401,6 +404,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -455,6 +459,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -512,7 +517,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ios.GraphViewCode;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -529,7 +534,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ios.GraphViewCode;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -546,7 +551,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ios.GraphViewIB;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -563,7 +568,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ios.GraphViewIB;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions GraphView/GraphViewCode/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class ViewController: UIViewController {
self.graphView.translatesAutoresizingMaskIntoConstraints = false
graphConstraints.removeAll()

let topConstraint = NSLayoutConstraint(item: self.graphView, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
let rightConstraint = NSLayoutConstraint(item: self.graphView, attribute: NSLayoutConstraint.Attribute.right, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.right, multiplier: 1, constant: 0)
let bottomConstraint = NSLayoutConstraint(item: self.graphView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
let leftConstraint = NSLayoutConstraint(item: self.graphView, attribute: NSLayoutConstraint.Attribute.left, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.left, multiplier: 1, constant: 0)
let topConstraint = NSLayoutConstraint(item: self.graphView!, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
let rightConstraint = NSLayoutConstraint(item: self.graphView!, attribute: NSLayoutConstraint.Attribute.right, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.right, multiplier: 1, constant: 0)
let bottomConstraint = NSLayoutConstraint(item: self.graphView!, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
let leftConstraint = NSLayoutConstraint(item: self.graphView!, attribute: NSLayoutConstraint.Attribute.left, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.left, multiplier: 1, constant: 0)

//let heightConstraint = NSLayoutConstraint(item: self.graphView, attribute: NSLayoutAttribute.Height, relatedBy: NSLayoutRelation.Equal, toItem: self.view, attribute: NSLayoutAttribute.Height, multiplier: 1, constant: 0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,18 @@
TargetAttributes = {
298BFD251F121BA10062F5C8 = {
CreatedOnToolsVersion = 8.3.3;
LastSwiftMigration = 1140;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 298BFD201F121BA10062F5C8 /* Build configuration list for PBXProject "ScrollableGraphView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 298BFD1C1F121BA10062F5C8;
productRefGroup = 298BFD271F121BA10062F5C8 /* Products */;
Expand Down Expand Up @@ -389,7 +391,7 @@
PRODUCT_BUNDLE_IDENTIFIER = SGV.ScrollableGraphView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -407,7 +409,7 @@
PRODUCT_BUNDLE_IDENTIFIER = SGV.ScrollableGraphView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down