每日代码 2020-08-06
2020-08-06 本文已影响0人
iOSWater
UIGraphicsBeginImageContextWithOptions(CGSize(width: screenWidth, height: 0.5), false, 0)
let path = UIBezierPath.init(rect: CGRect.init(x: 0, y: 0, width: screenWidth, height: 0.5))
UIColor.init(hexString: "0xDDDDDD")?.setFill()
path.fill()
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
tabBarViewController.tabBar.shadowImage = image