I am using UIColor(patternImage:) to achieve specific collection view cell edge. I observed that occasionally result is inaccurate.
but result occasionally looks like(this is zoomed bottom of cell):
I have white cell with light shadow on cell edges(from asset) and grey background.
In asset, there is no grey pixels at the top. View that is colorised using this method has exactly the same height like asset. Asset has no translucent pixels. Parent view has solid white colour. When previewing view hierarchy in Xcode, there is no grey line, however in device it is.
I thought, that it is a bottom part of asset(assumed that image is multiplied in view) but it is completely different colour, and both (view and asset) is the same hight.
I am setting colour in following way:
someView.backgroundColor = UIColor(patternImage: UIImage(named: "CellShadowBottom")!)
I guess this is some problem with rendering this view on real devices.
Anyone had similar issue? How can I fix this unexpected line?
Aucun commentaire:
Enregistrer un commentaire