The offending code is in this file and is commented out in this version (lines 25-34):class MusicStaffViewStaffLayer: CAShapeLayer { var maxLedgerLines : Int = 0 var currentHorizontalPosition : CGFloat { get { if let sublayers = self.sublayers! as? [CALayer] { if let lastElement = sublayers.last as CALayer! { return lastElement.frame.origin.x + lastElement.frame.size.width } } return 0 } } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) strokeColor = UIColor.blackColor().CGColor } override init() { super.init() strokeColor = UIColor.blackColor().CGColor } /* override var path : CGPath? { get { return staffPath() } set { } } */ func staffPath() -> CGPathRef { let staffLines = UIBezierPath() let spaceWidth : CGFloat = self.bounds.size.height / (6.0 + 2.0 * CGFloat(maxLedgerLines)) self.lineWidth = spaceWidth / 10.0 for i in 1...(5 + maxLedgerLines) { if (i <= maxLedgerLines || i > 5 + maxLedgerLines) { continue } let height = self.bounds.origin.y + spaceWidth * CGFloat(i)
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: