FAQ Database Discussion Community

Debugging code:: How to colors lines in CGContext?

The following code has an problem, for some reason the radial lines are being drawn black when they should be drawn in UIColor.yellowColor() import UIKit import QuartzCore let π:CGFloat = CGFloat(M_PI) class CircularPlotView:UIView { var lineWidth:CGFloat = 1.5 { didSet { setNeedsDisplay() } } var edgeColor:UIColor = UIColor.yellowColor() { didSet...

append arrowhead to UIBezierPath

I need your help: I am trying to create a graph using UIBezierPaths with variable widths and consisting of a bezier curve with two control points. Now I'd like to add arrow heads to the end (right hand side) of theses paths. Is there a way to do this i.e....

Cannot add CAGradientLayer to show up in UIView subclass

I have this UIView subclass I want to use for displaying a custom view. The problem is I cann't make the custom CAGradientLayer to show up in my view... I still see it as a red stripe. public class PSTLoadingBar : UIView { private var loadingBarView: UIView! private var gradientLayer:...