HBDNavigationBar icon indicating copy to clipboard operation
HBDNavigationBar copied to clipboard

能否加一个定制导航栏线的颜色功能

Open zmh10241015 opened this issue 5 years ago • 1 comments

zmh10241015 avatar Dec 31 '19 06:12 zmh10241015

You can create shadow image with color

extension UIImage {
    class func imageWithColor(color: UIColor, size: CGSize=CGSize(width: 1, height: 1)) -> UIImage? {
        UIGraphicsBeginImageContextWithOptions(size, false, 0)
        color.setFill()
        UIRectFill(CGRect(origin: CGPoint.zero, size: size))
        let image = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return image
    }
}

or you may have a look at WXNavigationBar

alexiscn avatar Mar 04 '20 13:03 alexiscn