Try this:
let path = CGMutablePath()
path.move(to: CGPoint(x: lineFrame.midX, y: lineFrame.midY))
path.addLine(to: CGPoint(x: lineFrame.origin.x + lineFrame.width / 2, y: lineFrame.origin.y))
And check the latest reference of CGMutablePath
:
More Related Contents:
- Correctly Parsing JSON in Swift 3
- How to create dispatch queue in Swift 3
- CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift
- Type ‘Any’ Has no Subscript Members in xcode 8 Swift 3 [duplicate]
- UICollectionView Layout like SnapChat?
- Error: Could not build Objective-C module ‘Firebase’
- upload image to server using Alamofire
- Long cycle blocks application
- Alamofire 4 upload with parameters
- Take a photo and save to photo library in Swift
- Xcode 8 Beta 4 Swift 3 – “round” behaviour changed
- Trigger notification weekly Swift 3
- Why is ‘nil’ not compatible with ‘UnsafePointer’ in Swift 3?
- Xcode 8 / Swift 3 : Simple UIPicker code not working
- Position a SceneKit object in front of SCNCamera’s current orientation
- Xcode 8 Warning “Instance method nearly matches optional requirement”
- Type ‘Any’ Has no Subscript Members in Xcode 8.1 Swift 3
- Swift 3 incorrect string interpolation with implicitly unwrapped Optionals
- Hide strange unwanted Xcode logs
- Xcode error: Code signing is required for product type ‘Application’ in SDK ‘iOS 10.0’
- How to implement method swizzling swift 3.0?
- How to apply the type to a NSFetchRequest instance?
- Strange generic function appear in view controller after converting to swift 3
- Model is running iOS 10.2 (14C92), which may not be supported by this version of Xcode
- Xcode 8 :function types cannot have argument label breaking my build
- Can’t Hide Status Bar—Swift 3, [duplicate]
- “Creating an image format with an unknown type is an error” with UIImagePickerController
- Why would a `scheduledTimer` fire properly when setup outside a block, but not within a block?
- Swift 3 – How do I extract captured groups in regular expressions?
- UITableViewCell Buttons with action