-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ios 9 - xcode 7 #400
Comments
It compiles well. On Xcode 7.0, final version. |
How can I update with podfile? I try to use pod update, but Xcode suggest me to convert swift files. Thank you. |
+1 An update of the pods would be great, thanks guys! 👍 |
I'm not sure if it relates to the issues that @donaldking reported, but in order to make the library compile using Xcode 7 stable, I had to make the following changes: diff --git a/Charts/Classes/Charts/ChartViewBase.swift b/Charts/Classes/Charts/ChartViewBase.swift
index 975357b..3e30a3b 100755
--- a/Charts/Classes/Charts/ChartViewBase.swift
+++ b/Charts/Classes/Charts/ChartViewBase.swift
@@ -776,7 +776,7 @@ public class ChartViewBase: UIView, ChartAnimatorDelegate
}
}
- layer.renderInOptionalContext(context)
+ layer.renderInContext(context!)
let image = UIGraphicsGetImageFromCurrentImageContext()
diff --git a/Charts/Classes/Components/ChartMarker.swift b/Charts/Classes/Components/ChartMarker.swift
index a91435a..e8261eb 100644
--- a/Charts/Classes/Components/ChartMarker.swift
+++ b/Charts/Classes/Components/ChartMarker.swift
@@ -44,7 +44,7 @@ public class ChartMarker: ChartComponentBase
let rect = CGRect(x: point.x + offset.x, y: point.y + offset.y, width: size.width, height: size.height)
- UIGraphicsPushContext(context)
+ UIGraphicsPushContext(context!)
image!.drawInRect(rect)
UIGraphicsPopContext()
}
diff --git a/Charts/Classes/Utils/ChartUtils.swift b/Charts/Classes/Utils/ChartUtils.swift
index 19acd44..f6d5b5d 100755
--- a/Charts/Classes/Utils/ChartUtils.swift
+++ b/Charts/Classes/Utils/ChartUtils.swift
@@ -129,7 +129,7 @@ internal class ChartUtils
point.x -= text.sizeWithAttributes(attributes).width
}
- UIGraphicsPushContext(context)
+ UIGraphicsPushContext(context!)
(text as NSString).drawAtPoint(point, withAttributes: attributes)
UIGraphicsPopContext()
}
@@ -149,7 +149,7 @@ internal class ChartUtils
rect.origin.x -= rect.size.width
}
- UIGraphicsPushContext(context)
+ UIGraphicsPushContext(context!)
(text as NSString).drawWithRect(rect, options: .UsesLineFragmentOrigin, attributes: attributes, context: nil)
UIGraphicsPopContext()
} |
@christosc Your issue is different. For some reason you haven't compiled the |
@danielgindi Thank you very much. That was indeed the problem; the missing |
Any branch with the updated Swift changes? This version currently on Master doesn't compile
The text was updated successfully, but these errors were encountered: