How to make custom MKPolyline in SWIFT with additional argument - color

后端 未结 3 1006
臣服心动
臣服心动 2021-01-12 10:53

Can any help me with making custom MKPolyline with additional argument Color?

CustomPolyline.swift

import Foundation
im         


        
3条回答
  •  孤街浪徒
    2021-01-12 11:37

    Another solution most easy:

    extension UIColor {
        static var rendererColor: UIColor {
            return UIColor(red: 65/255, green: 65/255, blue: 65/255, alpha: 1)
        }
    }
    

    And the use:

    renderer.strokeColor = UIColor.renderer
    

提交回复
热议问题