diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index f058d5c6d..73719c0f1 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -19,6 +19,7 @@ 512E094D2268B8AB00BDCFDD /* DeleteCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B99C9C1FAE83C600ECDEDB /* DeleteCommand.swift */; }; 517D9075226639F500323654 /* AddAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 517D906B2266392900323654 /* AddAccountViewController.swift */; }; 5183CCD0226E1E880010922C /* NonIntrinsicLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */; }; + 5183CCDA226E31A50010922C /* NonIntrinsicImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */; }; 519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; }; 51C451A9226377C200C03939 /* ArticlesDatabase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8407167F2262A61100344432 /* ArticlesDatabase.framework */; }; 51C451AA226377C200C03939 /* ArticlesDatabase.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8407167F2262A61100344432 /* ArticlesDatabase.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -611,6 +612,7 @@ 512E092B2268B25500BDCFDD /* UISplitViewController-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISplitViewController-Extensions.swift"; sourceTree = ""; }; 517D906B2266392900323654 /* AddAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewController.swift; sourceTree = ""; }; 5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonIntrinsicLabel.swift; sourceTree = ""; }; + 5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonIntrinsicImageView.swift; sourceTree = ""; }; 519B8D322143397200FA689C /* SharingServiceDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharingServiceDelegate.swift; sourceTree = ""; }; 51C4524E226506F400C03939 /* UIStoryboard-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboard-Extensions.swift"; sourceTree = ""; }; 51C4524F226506F400C03939 /* UIImage-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage-Extensions.swift"; sourceTree = ""; }; @@ -906,6 +908,7 @@ 51C45245226506C800C03939 /* Extensions */ = { isa = PBXGroup; children = ( + 5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */, 5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */, 51C45250226506F400C03939 /* String-Extensions.swift */, 51C4524F226506F400C03939 /* UIImage-Extensions.swift */, @@ -2136,6 +2139,7 @@ 840D617F2029031C009BC708 /* AppDelegate.swift in Sources */, 512E08E72268801200BDCFDD /* FeedTreeControllerDelegate.swift in Sources */, 51C452A422650A2D00C03939 /* ArticleUtilities.swift in Sources */, + 5183CCDA226E31A50010922C /* NonIntrinsicImageView.swift in Sources */, 51C4527B2265091600C03939 /* MasterUnreadIndicatorView.swift in Sources */, 51C45296226509D300C03939 /* OPMLExporter.swift in Sources */, 51C4525B226508DA00C03939 /* UIImage-Extensions.swift in Sources */, diff --git a/iOS/Extensions/NonIntrinsicImageView.swift b/iOS/Extensions/NonIntrinsicImageView.swift new file mode 100644 index 000000000..2403e1729 --- /dev/null +++ b/iOS/Extensions/NonIntrinsicImageView.swift @@ -0,0 +1,18 @@ +// +// NonIntrinsicImageView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 4/22/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import UIKit + +class NonIntrinsicImageView: UIImageView { + + // Prevent autolayout from messing around with our frame settings + override var intrinsicContentSize: CGSize { + return CGSize(width: UIView.noIntrinsicMetric, height: UIView.noIntrinsicMetric) + } + +} diff --git a/iOS/Timeline/Cell/MasterTimelineTableViewCell.swift b/iOS/Timeline/Cell/MasterTimelineTableViewCell.swift index b0acf2192..cfa6cd532 100644 --- a/iOS/Timeline/Cell/MasterTimelineTableViewCell.swift +++ b/iOS/Timeline/Cell/MasterTimelineTableViewCell.swift @@ -19,7 +19,7 @@ class MasterTimelineTableViewCell: UITableViewCell { private let feedNameView = MasterTimelineTableViewCell.singleLineUILabel() private lazy var avatarImageView: UIImageView = { - let imageView = UIImageView(image: AppAssets.feedImage) + let imageView = NonIntrinsicImageView(image: AppAssets.feedImage) imageView.contentMode = .scaleAspectFit return imageView }()