此时,需要用到less的e()字符串函数来让其以css方式解析 > ### e > >
CSS escaping, replaced with ~"value" syntax. > > It
expects string as a parameter and return its content as is, but without
quotes. It can be used to output CSS value which is either not valid CSS
syntax, or uses proprietary syntax which Less doesn't recognize. >
> Parameters: string - a string to escape. > >
Returns: string - the escaped string, without quotes. >
> Example: >
functestRemoveRedFilter(image: UIImage) -> UIImage { var thisImage =RGBAImage(image: image)! for y in0..<thisImage.height { for x in0..<thisImage.width { let sub = y * thisImage.width + x let pixel = thisImage.pixels[sub]//遍历每个像素 thisImage.pixels[sub] = removeRed(pixel) } } return thisImage.toUIImage()! }