Commit 6bb90ea2 authored by Tobias's avatar Tobias

improve focus effect of collection view image views

(does not work for large images such as the plex folder icons [top and bottom are cut off])
parent 5c69e392
......@@ -94,13 +94,6 @@ NSString *const VLCServerBrowsingTVCellIdentifier = @"VLCServerBrowsingTVCell";
return self.subtitleLabel.text;
}
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator
{
[coordinator addCoordinatedAnimations:^{
self.transform = self.focused ? CGAffineTransformMakeScale(1.3, 1.3): CGAffineTransformIdentity;
} completion:nil];
}
#pragma mark - MDFMovieDB
- (void)MDFMovieDBFetcher:(MDFMovieDBFetcher *)aFetcher didFindMovie:(MDFMovie *)details forSearchRequest:(NSString *)searchRequest
......
......@@ -27,7 +27,7 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="300" placeholderIntrinsicHeight="169" translatesAutoresizingMaskIntoConstraints="NO" id="tHQ-sR-zn4" customClass="VLCNetworkImageView">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="300" placeholderIntrinsicHeight="169" adjustsImageWhenAncestorFocused="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tHQ-sR-zn4" customClass="VLCNetworkImageView">
<rect key="frame" x="0.0" y="13" width="300" height="169"/>
<animations/>
</imageView>
......@@ -46,10 +46,11 @@
<constraint firstItem="I51-60-pwl" firstAttribute="top" secondItem="h3U-B3-AOa" secondAttribute="bottom" constant="8" id="UJB-cg-tjo"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="I51-60-pwl" secondAttribute="bottom" constant="8" id="UxF-cz-tVA"/>
<constraint firstItem="I51-60-pwl" firstAttribute="centerX" secondItem="Q7n-Zw-Frg" secondAttribute="centerX" id="b1v-nG-XoP"/>
<constraint firstAttribute="trailing" secondItem="tHQ-sR-zn4" secondAttribute="trailing" id="bmc-sc-RXt"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="tHQ-sR-zn4" secondAttribute="trailing" id="bmc-sc-RXt"/>
<constraint firstItem="tHQ-sR-zn4" firstAttribute="centerX" secondItem="Q7n-Zw-Frg" secondAttribute="centerX" id="chF-tu-ma8"/>
<constraint firstAttribute="trailing" secondItem="I51-60-pwl" secondAttribute="trailing" constant="8" id="ftZ-YD-4bt"/>
<constraint firstItem="h3U-B3-AOa" firstAttribute="leading" secondItem="Q7n-Zw-Frg" secondAttribute="leading" constant="8" id="p8s-T6-E5f"/>
<constraint firstItem="tHQ-sR-zn4" firstAttribute="leading" secondItem="Q7n-Zw-Frg" secondAttribute="leading" id="tfE-v0-GDf"/>
<constraint firstItem="tHQ-sR-zn4" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Q7n-Zw-Frg" secondAttribute="leading" id="tfE-v0-GDf"/>
<constraint firstItem="tHQ-sR-zn4" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Q7n-Zw-Frg" secondAttribute="top" id="yTa-gB-hID"/>
</constraints>
<size key="customSize" width="314" height="270"/>
......
......@@ -72,4 +72,11 @@ static NSCache *sharedImageCache = nil;
[self.downloadTask resume];
}
}
- (void)setImage:(UIImage *)image
{
[super setImage:image];
[self invalidateIntrinsicContentSize];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment