CR: remove bundle specific image assets

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 654d345469
commit e20072ff2b

@ -292,7 +292,7 @@ public class MediaMessageView: UIView, OWSAudioAttachmentPlayerDelegate {
private func createHeroImageView(imageName: String) -> UIView {
let imageSize = createHeroViewSize()
let image = UIImage(named: imageName, inBundleForClass: type(of:self))
let image = UIImage(named: imageName)
assert(image != nil)
let imageView = UIImageView(image: image)
imageView.layer.minificationFilter = kCAFilterTrilinear
@ -482,11 +482,3 @@ public class MediaMessageView: UIView, OWSAudioAttachmentPlayerDelegate {
OWSAudioAttachmentPlayer.setAudioIgnoresHardwareMuteSwitch(false)
}
}
extension UIImage {
public convenience init?(named: String, inBundleForClass someClass: AnyClass) {
// let image = UIImage(named: imageName, inBundleForClass: type(of:self))
let bundle = Bundle(for: someClass)
self.init(named: named, in: bundle, compatibleWith: nil)
}
}

Loading…
Cancel
Save