New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash #137

Merged
merged 3 commits into from Nov 14, 2018
Jump to file or symbol
Failed to load files and symbols.
+122 −150
Diff settings

Always

Just for now

@@ -144,7 +144,6 @@
67D434F11EB0000C001A79D8 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67D434F01EB0000C001A79D8 /* ProfileViewController.swift */; };
67E10ACE1F637FAA009F017C /* Filter.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67E10ACC1F637FAA009F017C /* Filter.storyboard */; };
67E10AD01F6385FE009F017C /* FilterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67E10ACF1F6385FE009F017C /* FilterViewController.swift */; };
67E10AD21F6389C3009F017C /* FilterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67E10AD11F6389C3009F017C /* FilterCollectionViewCell.swift */; };
67F32F9C21116AA500509F09 /* NewsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F32F9B21116AA400509F09 /* NewsTests.swift */; };
67F39C1A1EB2DEE600CF99F2 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F39C191EB2DEE600CF99F2 /* SearchViewController.swift */; };
67F5C2C5219B8AD8009093D8 /* ImageCacheManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F5C2C4219B8AD8009093D8 /* ImageCacheManager.swift */; };
@@ -405,7 +404,6 @@
67D434F01EB0000C001A79D8 /* ProfileViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
67E10ACD1F637FAA009F017C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Filter.storyboard; sourceTree = "<group>"; };
67E10ACF1F6385FE009F017C /* FilterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterViewController.swift; sourceTree = "<group>"; };
67E10AD11F6389C3009F017C /* FilterCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterCollectionViewCell.swift; sourceTree = "<group>"; };
67F32F9B21116AA400509F09 /* NewsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewsTests.swift; sourceTree = "<group>"; };
67F39C191EB2DEE600CF99F2 /* SearchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = "<group>"; };
67F5C2C4219B8AD8009093D8 /* ImageCacheManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ImageCacheManager.swift; path = src/Managers/ImageCacheManager.swift; sourceTree = "<group>"; };
@@ -823,7 +821,6 @@
674E7CF220E0909F007A8337 /* CategoryCollectionViewCell.swift */,
674E7CEE20E085A1007A8337 /* NewsFooterView.swift */,
677392C21F6B42CE0076E8BB /* DynamicHeightCollectionView.swift */,
67E10AD11F6389C3009F017C /* FilterCollectionViewCell.swift */,
6730A4292198DA26003FB180 /* LabelCollectionViewCell.swift */,
6798E8CE1D88F3390032D350 /* KeywordCollectionViewCell.swift */,
670D2C7B1DDC09D000237C39 /* NewsTableViewCell.swift */,
@@ -1640,7 +1637,6 @@
6787B45E20E74F5C00E6FA63 /* CategoriesService.swift in Sources */,
6797F8AE1EE4B38E00B8EAA5 /* News.swift in Sources */,
67617F801F6CB2C200674320 /* DimPresentAnimationController.swift in Sources */,
67E10AD21F6389C3009F017C /* FilterCollectionViewCell.swift in Sources */,
67CE08B31E903B2D00D5911E /* ReactionPickerViewController.swift in Sources */,
6704850820F9537B00360701 /* ReviewView.swift in Sources */,
FBBDCC6E20F2C3B200757861 /* TrendingTerm.swift in Sources */,
@@ -36,34 +36,7 @@
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="10" minY="0.0" maxX="10" maxY="10"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" misplaced="YES" reuseIdentifier="cell" id="PVu-FZ-ihz" customClass="FilterCollectionViewCell" customModule="Canillitapp" customModuleProvider="target">
<rect key="frame" x="10" y="50" width="100" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="100" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La Nación" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uss-vr-y70">
<rect key="frame" x="10" y="10" width="80" height="0.0"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="uss-vr-y70" secondAttribute="bottom" priority="999" constant="10" id="5Fc-A1-JqF"/>
<constraint firstItem="uss-vr-y70" firstAttribute="leading" secondItem="PVu-FZ-ihz" secondAttribute="leading" constant="10" id="DGG-wh-Jch"/>
<constraint firstAttribute="trailing" secondItem="uss-vr-y70" secondAttribute="trailing" priority="999" constant="10" id="a2N-Os-e1v"/>
<constraint firstItem="uss-vr-y70" firstAttribute="top" secondItem="PVu-FZ-ihz" secondAttribute="top" constant="10" id="tuB-qN-Vxt"/>
</constraints>
<connections>
<outlet property="titleLabel" destination="uss-vr-y70" id="goq-EI-S93"/>
</connections>
</collectionViewCell>
</cells>
<cells/>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" misplaced="YES" reuseIdentifier="header" id="Hg5-3C-eIq">
<rect key="frame" x="0.0" y="0.0" width="400" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -96,34 +69,7 @@
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="10" minY="0.0" maxX="10" maxY="10"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" misplaced="YES" reuseIdentifier="cell" id="CcN-d3-lAD" customClass="FilterCollectionViewCell" customModule="Canillitapp" customModuleProvider="target">
<rect key="frame" x="10" y="50" width="100" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="100" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La Nación" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HsZ-FS-9oT">
<rect key="frame" x="10" y="10" width="80" height="184"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<color key="backgroundColor" red="0.84705882352941175" green="0.84705882352941175" blue="0.84705882352941175" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="HsZ-FS-9oT" secondAttribute="bottom" priority="999" constant="10" id="5RP-hv-ROz"/>
<constraint firstItem="HsZ-FS-9oT" firstAttribute="top" secondItem="CcN-d3-lAD" secondAttribute="top" constant="10" id="bAA-Vb-GIA"/>
<constraint firstItem="HsZ-FS-9oT" firstAttribute="leading" secondItem="CcN-d3-lAD" secondAttribute="leading" constant="10" id="tHi-H4-nfg"/>
<constraint firstAttribute="trailing" secondItem="HsZ-FS-9oT" secondAttribute="trailing" priority="999" constant="10" id="yDz-zp-GCC"/>
</constraints>
<connections>
<outlet property="titleLabel" destination="HsZ-FS-9oT" id="orv-E3-t8t"/>
</connections>
</collectionViewCell>
</cells>
<cells/>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" misplaced="YES" reuseIdentifier="header" id="0nN-ag-XgZ">
<rect key="frame" x="0.0" y="0.0" width="400" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -112,39 +112,8 @@
<inset key="sectionInset" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="interest_cell" id="168-ef-5mz" customClass="LabelCollectionViewCell" customModule="Canillitapp" customModuleProvider="target">
<rect key="frame" x="10" y="40" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8D5-Xd-Ali">
<rect key="frame" x="10" y="10" width="30" height="30"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<color key="backgroundColor" red="0.92143100499999997" green="0.92145264149999995" blue="0.92144101860000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="8D5-Xd-Ali" secondAttribute="bottom" priority="999" constant="10" id="0sa-Lr-66K"/>
<constraint firstItem="8D5-Xd-Ali" firstAttribute="leading" secondItem="168-ef-5mz" secondAttribute="leading" constant="10" id="BJn-v7-CGw"/>
<constraint firstAttribute="trailing" secondItem="8D5-Xd-Ali" secondAttribute="trailing" priority="999" constant="10" id="QPD-Gl-Zy4"/>
<constraint firstItem="8D5-Xd-Ali" firstAttribute="top" secondItem="168-ef-5mz" secondAttribute="top" constant="10" id="eQB-WD-Ykz"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="label" destination="8D5-Xd-Ali" id="C5r-li-VQt"/>
</connections>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="reaction_cell" id="CDa-4e-j6b" customClass="ProfileReactionCollectionViewCell" customModule="Canillitapp" customModuleProvider="target">
<rect key="frame" x="70" y="40" width="188" height="50"/>
<rect key="frame" x="93.5" y="40" width="188" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="188" height="50"/>
@@ -27,6 +27,8 @@ class FilterViewController: UIViewController,
filterSourcesDataSource?.collectionView = sourcesCollectionView
sourcesCollectionView.dataSource = self.filterSourcesDataSource
sourcesCollectionView.delegate = self.filterSourcesDataSource
sourcesCollectionView.register(LabelCollectionViewCell.self, forCellWithReuseIdentifier: "cell")
}
func setupCategoriesCollectionView() {
@@ -35,6 +37,8 @@ class FilterViewController: UIViewController,
filterCategoriesDataSource?.collectionView = categoriesCollectionView
categoriesCollectionView.dataSource = self.filterCategoriesDataSource
categoriesCollectionView.delegate = self.filterCategoriesDataSource
categoriesCollectionView.register(LabelCollectionViewCell.self, forCellWithReuseIdentifier: "cell")
}
override func viewDidLoad() {
@@ -88,6 +88,11 @@ class ProfileViewController: UIViewController, TabbedViewController, UICollectio
}
let fail: ((Error) -> Void) = { [unowned self] (error) in
// Either if it fails, we should reset this state.
self.centerActivityIndicator.isHidden = true
self.collectionView.alpha = 1.0
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(1)) {
self.endRefreshing()
}
@@ -114,6 +119,8 @@ class ProfileViewController: UIViewController, TabbedViewController, UICollectio
// Hide collectionView until we got info fetched for the first time
collectionView.alpha = 0
collectionView.register(LabelCollectionViewCell.self, forCellWithReuseIdentifier: "interest_cell")
}
func handleReactionSelection(_ reaction: Reaction) {
@@ -213,14 +220,8 @@ class ProfileViewController: UIViewController, TabbedViewController, UICollectio
return CGSize(width: cellWidth, height: 60)
default:
guard let cell = profileDataSource.collectionView(collectionView, cellForItemAt: indexPath) as? LabelCollectionViewCell else {
return CGSize(width: 60, height: 60)
}
cell.setNeedsLayout()
cell.layoutIfNeeded()
let size = cell.systemLayoutSizeFitting(UILayoutFittingCompressedSize)
return size
let text = profileDataSource.interests[indexPath.row].name
return LabelCollectionViewCell.size(with: text)
}
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.