Post not yet marked as solved
Post marked as unsolved with 0 replies, 402 views
Hi,I have a UICollectionView with UICollectionViewCells of the following type:import UIKit
import TVUIKit
class AirportsCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView!
var airportView: TVMonogramView!
override func awakeFromNib() {
airportView = TVMonogramView(frame: self.contentView.frame)
airportView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(airportView)
}
}When I try to set a vector image from my assets to the airportView.image, the quality is very poor and the image does not seem to be rendered correctly.if let flag = UIImage(named: countryCode) {
cell.airportView.image = flag
} else {
cell.airportView.image = nil
}I have of course checked the "Preserve vector data" and the images look otherwise great in any size when I set them to my UIImageViews of choice anywhere else. The TVMonogramView seems to initialize the images in a very small size and the scale them up or perhaps doesn't re-render them when they change in size.How can I fix this behaviour and what is the alternative?